diff options
author | root <root@rshg054.dnsready.net> | 2013-06-04 00:27:56 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-06-04 00:27:56 -0700 |
commit | cc57cb201ddb179d2bb481c13dd4f286ae643b12 (patch) | |
tree | 7932470d6b8a193c032f1012a7996cc78ea52201 /core/openvpn/openvpn.rc | |
parent | 1f86bf1b08cb980cea57c1d4d3187e2251f5a63b (diff) |
Tue Jun 4 00:27:56 PDT 2013
Diffstat (limited to 'core/openvpn/openvpn.rc')
-rwxr-xr-x | core/openvpn/openvpn.rc | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/core/openvpn/openvpn.rc b/core/openvpn/openvpn.rc deleted file mode 100755 index 96c28b641..000000000 --- a/core/openvpn/openvpn.rc +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -CFGDIR="/etc/openvpn" -STATEDIR="/var/run/openvpn" - -case "$1" in - start) - stat_busy "Starting OpenVPN ... " - success=0 - mkdir -p "${STATEDIR}" - for cfg in "${CFGDIR}"/*.conf; do - stat_append "$(basename "${cfg}" .conf) " - /usr/sbin/openvpn --daemon --writepid "${STATEDIR}"/"$(basename "${cfg}" .conf)".pid --cd "${CFGDIR}" --config "${cfg}" || success=$? - done - if [ $success -eq 0 ]; then - add_daemon openvpn - stat_done - else - stat_fail - fi - ;; - stop) - stat_busy "Stopping OpenVPN ..." - for pidfile in "${STATEDIR}"/*.pid; do - stat_append "$(basename "${pidfile}" .pid) " - kill $(cat "${pidfile}" 2>/dev/null) 2>/dev/null - rm -f "${pidfile}" - done - rm_daemon openvpn - stat_done - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 |