From 7fc57ebc80ab77b9d085741e4ddd5d3e2946627d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 4 Aug 2017 21:51:22 +0000 Subject: [PATCH] ipsec: Make sure not to reload strongswan if it is not running Signed-off-by: Michael Tremer --- src/functions/functions.ipsec | 5 +++++ 1 file changed, 5 insertions(+) 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} -- 2.47.3