Exit directly will result procd service inactive and uci
configuration changes are no longer monitored.
Reported-by: Lvc Revincx <revincx233@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
local enabled
config_get_bool enabled "config" "enabled"
- [ "$enabled" -eq "1" ] || exit 1
+ [ "$enabled" -eq "1" ] || return 1
procd_open_instance "$CONF"
procd_set_param command "$PROG" "tunnel"
start_service() {
config_load "$CONF"
- is_enabled "global" "enabled" || exit 1
+ is_enabled "global" "enabled" || return 1
procd_open_instance "$CONF"
procd_set_param command "$PROG"
local enabled
config_get_bool enabled "enabled" "enabled" "0"
- [ "$enabled" -eq "0" ] && exit 1
+ [ "$enabled" -eq "1" ] || return 1
local confdir
local conffiles
start_service() {
config_load "$CONF"
- is_enabled "config" "enabled" || exit 1
+ is_enabled "config" "enabled" || return 1
procd_open_instance "$CONF"
procd_set_param command "$PROG"
config_load "$CONF"
local enabled
- config_get enabled "enabled" "enabled" "0"
- [ "$enabled" -eq "0" ] && exit 1
+ config_get_bool enabled "enabled" "enabled" "0"
+ [ "$enabled" -eq "1" ] || return 1
local confdir
local conffiles