diff options
Diffstat (limited to 'openvpn.initd')
-rwxr-xr-x | openvpn.initd | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openvpn.initd b/openvpn.initd index 3568a9f..b42aa13 100755 --- a/openvpn.initd +++ b/openvpn.initd @@ -1,13 +1,13 @@ -#!/usr/bin/openrc-run +#!/sbin/openrc-run # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 VPNDIR=${VPNDIR:-/etc/openvpn} -#VPN=${SVCNAME#*.} +VPN=${SVCNAME#*.} if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then - VPNPID="/run/openvpn.${VPN}.pid" + VPNPID="/var/run/openvpn.${VPN}.pid" else - VPNPID="/run/openvpn.pid" + VPNPID="/var/run/openvpn.pid" fi VPNCONF="${VPNDIR}/${VPN}.conf" @@ -110,7 +110,7 @@ start() { [ -n "${PEER_DNS}" ] && args="${args} --setenv PEER_DNS ${PEER_DNS}" [ "${reenter}" = "yes" ] && mark_service_inactive "${SVCNAME}" - start-stop-daemon --start --exec /usr/bin/openvpn --pidfile "${VPNPID}" \ + start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \ -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon \ --setenv SVCNAME "${SVCNAME}" ${args} eend $? "Check your logs to see why startup failed" @@ -126,7 +126,7 @@ stop() { ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop --quiet \ - --exec /usr/bin/openvpn --pidfile "${VPNPID}" + --exec /usr/sbin/openvpn --pidfile "${VPNPID}" eend $? } |