aboutsummaryrefslogtreecommitdiffstats
path: root/main/gvpe/gvpe.initd
blob: 4cb2f03de52a226fc39a94f86056efadf3ed5081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/sbin/openrc-run
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$

opts="reconnect"

GVPED_PID=/run/gvped.pid
depend() {
	use logger dns
	need net
}


start() {
	ebegin "Starting gvpe VPN"
	    start-stop-daemon --start --exec /usr/sbin/gvpe --pidfile "${GVPED_PID}" \
    	    -- -linfo -L ${NODENAME}
	eend $?
}

stop() {
	ebegin "Stopping gvpe VPN"
	    start-stop-daemon --stop --exec /usr/sbin/gvpe --pidfile "${GVPED_PID}"
	eend $?
}

reconnect() {
	ebegin "Reconnecting gpve VPN"
	    /usr/bin/gvpectrl --kill=HUP
	eend $?
}