emailrelay: early return if not enabled
authorSergey Ponomarev <[email protected]>
Mon, 16 May 2022 12:34:09 +0000 (15:34 +0300)
committerJosef Schlehofer <[email protected]>
Wed, 21 May 2025 09:08:36 +0000 (11:08 +0200)
Signed-off-by: Sergey Ponomarev <[email protected]>
mail/emailrelay/files/emailrelay.init

index 28f1fdd04987d4244b350f7b70cd5795957d1523..d4755e2ae2577731cef344ea7a63b655b566eb27 100644 (file)
@@ -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