summaryrefslogblamecommitdiff
path: root/user/strongswan/strongswan.initd
blob: 78fecb0ee539d10864c04770956efea3a3223b2c (plain) (tree)


































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