ace-overlay/net-vpn/gvpe/files/gvpe.rc

33 lines
607 B
Plaintext
Raw Normal View History

2017-10-09 02:27:09 +00:00
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$
opts="reconnect"
GVPED_PID=/var/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 $?
}