diff options
author | Lee Starnes <lee@canned-death.us> | 2018-09-09 06:18:33 +0000 |
---|---|---|
committer | Lee Starnes <lee@canned-death.us> | 2018-09-29 22:52:48 +0000 |
commit | aa32872d191a1b0704758ed0114b0e670e5eb8be (patch) | |
tree | 9117749e09b1fd243daaad01e5f65bd4bddc7f89 /user/strongswan/charon.initd | |
parent | 280958f5eafe6114bf9c6ecf44fca5d910049869 (diff) | |
download | packages-aa32872d191a1b0704758ed0114b0e670e5eb8be.tar.gz packages-aa32872d191a1b0704758ed0114b0e670e5eb8be.tar.bz2 packages-aa32872d191a1b0704758ed0114b0e670e5eb8be.tar.xz packages-aa32872d191a1b0704758ed0114b0e670e5eb8be.zip |
user/strongswan: import from alpine
Diffstat (limited to 'user/strongswan/charon.initd')
-rw-r--r-- | user/strongswan/charon.initd | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/user/strongswan/charon.initd b/user/strongswan/charon.initd new file mode 100644 index 000000000..6f79679c0 --- /dev/null +++ b/user/strongswan/charon.initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run + +description="strongSwan charon IKE daemon" +command="/usr/lib/strongswan/charon" +pidfile="/var/run/charon.pid" +start_stop_daemon_args="--background" +extra_started_commands="reload fullstatus" + +depend() { + need net + after firewall + provide ipsec +} + +start_post() { + ebegin "Loading ${name:-$RC_SVCNAME} configuration" + sleep 0.2 + swanctl --load-all &>/dev/null + eend $? +} + +reload() { + swanctl --reload-settings + swanctl --load-all +} + +fullstatus() { + swanctl --list-conns + swanctl --list-sas +} |