From: Michael Tremer Date: Fri, 4 Aug 2017 21:51:22 +0000 (+0000) Subject: ipsec: Make sure not to reload strongswan if it is not running X-Git-Tag: 009~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fc57ebc80ab77b9d085741e4ddd5d3e2946627d;p=network.git ipsec: Make sure not to reload strongswan if it is not running Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.ipsec b/src/functions/functions.ipsec index 702527dd..53b431cf 100644 --- a/src/functions/functions.ipsec +++ b/src/functions/functions.ipsec @@ -380,6 +380,11 @@ ipsec_strongswan_autostart() { } ipsec_strongswan_load() { + # Do nothing if strongswan is not running + if ! service_is_active "strongswan"; then + return ${EXIT_OK} + fi + if ! cmd swanctl --load-all; then log ERROR "Could not reload strongswan config" return ${EXIT_ERROR}