autossh: return from instance function, not exit the script

In case of disabled configuration instances in the bottom of
configuration file, enabled instances won't be started as the first
disabled instance would return in init script termination.

Signed-off-by: ValdikSS ValdikSS <iam@valdikss.org.ru>
This commit is contained in:
ValdikSS ValdikSS 2023-01-12 23:32:00 +03:00 committed by Rosen Penev
parent 76ba437114
commit 02e95fdef9
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ start_instance() {
config_get poll "$section" 'poll'
config_get_bool enabled "$section" 'enabled' '1'
[ "$enabled" = 1 ] || exit 0
[ "$enabled" = 1 ] || return 1
procd_open_instance
procd_set_param command /usr/sbin/autossh -M ${monitorport:-20000} ${ssh}