opt/openvpn/openvpn.rc

28 lines
403 B
Plaintext
Raw Normal View History

2006-02-23 16:26:10 +01:00
#!/bin/sh
#
# /etc/rc.d/openvpn: start/stop openvpn daemon
#
case $1 in
start)
/usr/sbin/openvpn \
--config /etc/openvpn/openvpn.conf \
--writepid /var/run/openvpn.pid \
--log-append /var/log/openvpn.log \
--daemon
;;
stop)
kill `cat /var/run/openvpn.pid`
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
# End of file