From 15ce9af907685a5daba2ed5e91b7191cf501e69a Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 17 Oct 2022 20:46:28 +0800 Subject: [PATCH] treewide: fix procd service inactive Exit directly will result procd service inactive and uci configuration changes are no longer monitored. Reported-by: Lvc Revincx Signed-off-by: Tianling Shen (cherry picked from commit b1651c5d5444b990b58180a26d6e76779cbb88a9) --- net/cloudflared/files/cloudflared.init | 2 +- net/dnsproxy/files/dnsproxy.init | 2 +- net/v2ray-core/files/v2ray.init | 2 +- net/v2raya/files/v2raya.init | 2 +- net/xray-core/files/xray.init | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/cloudflared/files/cloudflared.init b/net/cloudflared/files/cloudflared.init index fdf0286183..4fac31aac4 100755 --- a/net/cloudflared/files/cloudflared.init +++ b/net/cloudflared/files/cloudflared.init @@ -18,7 +18,7 @@ start_service() { 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" diff --git a/net/dnsproxy/files/dnsproxy.init b/net/dnsproxy/files/dnsproxy.init index 9ac2751b3e..1514ee1526 100644 --- a/net/dnsproxy/files/dnsproxy.init +++ b/net/dnsproxy/files/dnsproxy.init @@ -88,7 +88,7 @@ load_config_param() { 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" diff --git a/net/v2ray-core/files/v2ray.init b/net/v2ray-core/files/v2ray.init index e43f511835..c19bd9cab6 100755 --- a/net/v2ray-core/files/v2ray.init +++ b/net/v2ray-core/files/v2ray.init @@ -11,7 +11,7 @@ start_service() { local enabled config_get_bool enabled "enabled" "enabled" "0" - [ "$enabled" -eq "0" ] && exit 1 + [ "$enabled" -eq "1" ] || return 1 local confdir local conffiles diff --git a/net/v2raya/files/v2raya.init b/net/v2raya/files/v2raya.init index a8295b6f45..9c207f7d94 100755 --- a/net/v2raya/files/v2raya.init +++ b/net/v2raya/files/v2raya.init @@ -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" diff --git a/net/xray-core/files/xray.init b/net/xray-core/files/xray.init index a24255e9d5..7e4b8a7dbd 100755 --- a/net/xray-core/files/xray.init +++ b/net/xray-core/files/xray.init @@ -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 -- 2.30.2