Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 36 lines (33 sloc) 596 Bytes
#!/bin/bash
#
# tinc
#
# chkconfig: - 85 15
# description: start, stop, restart tincd
#
RETVAL=0
case "$1" in
start)
/usr/local/sbin/tincd -n vpn
RETVAL=$?
;;
stop)
kill `cat /usr/local/var/run/tinc.vpn.pid`
rm /usr/local/var/run/tinc.vpn.pid
RETVAL=$?
;;
restart)
/usr/local/sbin/tincd -n vpn -k
/usr/local/sbin/tincd -n vpn -k
/usr/local/sbin/tincd -n vpn
RETVAL=$?
;;
status)
RETVAL=$?
;;
*)
echo "Usage: god {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL