summaryrefslogtreecommitdiffstats
path: root/testing/openvpn/openvpn.initd
diff options
context:
space:
mode:
authorMichael Mason <ms13sp@gmail.com>2009-03-18 13:38:33 +0000
committerMichael Mason <ms13sp@gmail.com>2009-03-18 13:38:33 +0000
commit28b0c2511507640f03349712dcb7f1eec85e7116 (patch)
treece23612d8b53dcfb7b4582300da7c2e82cb19edd /testing/openvpn/openvpn.initd
parentc9fa1a7056ea1f965fcc22a9d83e125b0ad72282 (diff)
downloadaports-28b0c2511507640f03349712dcb7f1eec85e7116.tar.bz2
aports-28b0c2511507640f03349712dcb7f1eec85e7116.tar.xz
Ncopa already moved to extra
Diffstat (limited to 'testing/openvpn/openvpn.initd')
-rw-r--r--testing/openvpn/openvpn.initd63
1 files changed, 0 insertions, 63 deletions
diff --git a/testing/openvpn/openvpn.initd b/testing/openvpn/openvpn.initd
deleted file mode 100644
index a6e4529e1..000000000
--- a/testing/openvpn/openvpn.initd
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-VPNDIR="/etc/openvpn"
-VPN="${SVCNAME#*.}"
-if [ -n "${VPN}" ] && [ "${SVCNAME}" != "openvpn" ]; then
- VPNPID="/var/run/openvpn.${VPN}.pid"
-else
- VPNPID="/var/run/openvpn.pid"
-fi
-VPNCONF="${VPNDIR}/${VPN}.conf"
-
-depend() {
- need localmount net
- before netmount
- after bootmisc
-}
-
-checktundevice() {
- if [ ! -e /dev/net/tun ]; then
- if ! modprobe tun ; then
- eerror "TUN/TAP support is not available in this kernel"
- return 1
- fi
- fi
- if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
- ebegin "Detected broken /dev/net/tun symlink, fixing..."
- rm -f /dev/net/tun
- ln -s /dev/misc/net/tun /dev/net/tun
- eend $?
- fi
-}
-
-start() {
- ebegin "Starting ${SVCNAME}"
-
- checktundevice || return 1
-
- if [ ! -e "${VPNCONF}" ]; then
- eend 1 "${VPNCONF} does not exist"
- return 1
- fi
-
- local args=""
- # If the config file does not specify the cd option, we do
- # But if we specify it, we override the config option which we do not want
- if ! grep -q "^[ \t]*cd[ \t].*" "${VPNCONF}" ; then
- args="${args} --cd ${VPNDIR}"
- fi
-
- start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \
- -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon ${args}
- eend $? "Check your logs to see why startup failed"
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --exec /usr/sbin/openvpn --pidfile "${VPNPID}"
- eend $?
-}
-
-# vim: ts=4