From: Sergey Ponomarev Date: Mon, 16 May 2022 12:34:09 +0000 (+0300) Subject: emailrelay: early return if not enabled X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=caa4f7f8faf1f2970f1b6e187dc7da6e78887bcf;p=feed%2Fpackages.git emailrelay: early return if not enabled Signed-off-by: Sergey Ponomarev --- diff --git a/mail/emailrelay/files/emailrelay.init b/mail/emailrelay/files/emailrelay.init index 28f1fdd049..d4755e2ae2 100644 --- a/mail/emailrelay/files/emailrelay.init +++ b/mail/emailrelay/files/emailrelay.init @@ -12,6 +12,7 @@ emailrelay_instance() local enabled mode port remote_clients server_tls server_auth extra_cmdline smarthost client_tls client_auth address_verifier domain anonymous config_get_bool enabled "$1" enabled + [ "$enabled" = 0 ] && return 1 config_get mode "$1" mode config_get port "$1" port config_get_bool remote_clients "$1" remote_clients @@ -25,8 +26,6 @@ emailrelay_instance() config_get domain "$1" domain config_get_bool anonymous "$1" anonymous - [ "$enabled" = 0 ] && return 1 - procd_open_instance procd_set_param command "$PROG" --no-daemon