summaryrefslogblamecommitdiff
path: root/user/strongswan/charon.initd
blob: 7fda8d7754d6e9c8a4a0de250a6077bed5999f33 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                           
                                          











                                 
#!/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 2>&1
	eend $?
}

reload() {
	swanctl --reload-settings
	swanctl --load-all
}

fullstatus() {
	swanctl --list-conns
	swanctl --list-sas
}