diff options
Diffstat (limited to 'user/strongswan/strongswan.initd')
-rw-r--r-- | user/strongswan/strongswan.initd | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/user/strongswan/strongswan.initd b/user/strongswan/strongswan.initd new file mode 100644 index 000000000..78fecb0ee --- /dev/null +++ b/user/strongswan/strongswan.initd @@ -0,0 +1,35 @@ +#!/sbin/openrc-run + +extra_started_commands="fullstatus" + +depend() { + need net + after firewall + provide ipsec +} + +start() { + ebegin "Starting StrongSwan" + ipsec start + eend $? +} + +stop () { + ebegin "Stopping StrongSwan" + ipsec stop + eend $? +} + +restart() { + ebegin "Restarting StrongSwan" + svc_stop + sleep 2 + svc_start + eend $? +} + +fullstatus() { + ebegin "StrongSwan Status (verbose):" + ipsec statusall + eend $? +} |