diff options
Diffstat (limited to 'package/strongswan/files/ipsec.init')
-rw-r--r-- | package/strongswan/files/ipsec.init | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/package/strongswan/files/ipsec.init b/package/strongswan/files/ipsec.init new file mode 100644 index 000000000..b4cdbf3c1 --- /dev/null +++ b/package/strongswan/files/ipsec.init @@ -0,0 +1,29 @@ +#!/bin/sh +#PKG strongswan +#INIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${ipsec:-NO}" = x"NO" && exit 0 + test x"$ipsec" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start + exec sh $0 start + ;; +start) + ipsec start + ;; +stop) + ipsec stop + ;; +restart) + sh $0 stop + sleep 3 + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? |