]> git.ipfire.org Git - people/stevee/network.git/commitdiff
ipsec: Make sure not to reload strongswan if it is not running
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Aug 2017 21:51:22 +0000 (21:51 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Aug 2017 21:51:22 +0000 (21:51 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.ipsec

index 702527ddb5d5855f48b1f0c1f6ce9af1740b26fd..53b431cf2b91a86a617a4ccda311460474f3292d 100644 (file)
@@ -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}