#!/bin/sh . /etc/rc.conf case "$1" in autostart) test x"$openvpn" = x"NO" && exit 0 exec $0 start ;; start) [ -f /etc/openvpn/openvpn.conf ] || exit openvpn --daemon --config openvpn.conf --cd /etc/openvpn ;; stop) killall openvpn ;; restart) $0 stop sleep 3 $0 start ;; esac exit $?