Redhat/Fedora requires var/lock/subsys/ipsec for runlevel changes
[strongswan.git] / src / ipsec / ipsec.in
index 8e5bdc4..05db364 100755 (executable)
@@ -243,6 +243,9 @@ secrets)
        ;;
 start)
        shift
+       if [ -d /var/lock/subsys ]; then
+               touch /var/lock/subsys/ipsec
+       fi
        exec $IPSEC_STARTER "$@"
        ;;
 status|statusall)
@@ -306,6 +309,9 @@ stop)
        else
                echo "Stopping strongSwan IPsec failed: starter is not running" >&2
        fi
+       if [ -d /var/lock/subsys ]; then
+               rm -f /var/lock/subsys/ipsec
+       fi
        exit 0
        ;;
 up)