summaryrefslogblamecommitdiff
path: root/user/strongswan/charon.initd
blob: 6f79679c0221798f08838447dff35b97292f7363 (plain) (tree)





























                                                           
#!/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
}