treewide: fix procd service inactive

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>
(cherry picked from commit b1651c5d54)
This commit is contained in:
Tianling Shen 2022-10-17 20:46:28 +08:00
parent 73fdd5701a
commit b45c3deae9
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ append_env_bool() {
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"

View File

@ -10,8 +10,8 @@ start_service() {
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