diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-06 19:43:59 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-06 21:30:15 +0200 |
commit | 39995d882d8edc530b3cfa2752fce19e74bbcfdf (patch) | |
tree | 64bdb8508cb0a1d78a3766335d35a1c78925c6ea /main/openvpn/openvpn.initd | |
parent | d2e0d2c599f08f03f98ad0e59cdeb6a4f4ac294e (diff) | |
download | aports-39995d882d8edc530b3cfa2752fce19e74bbcfdf.tar.bz2 aports-39995d882d8edc530b3cfa2752fce19e74bbcfdf.tar.xz |
main/openvpn: rename deprecated $SVCNAME to $RC_SVCNAME
Diffstat (limited to 'main/openvpn/openvpn.initd')
-rw-r--r-- | main/openvpn/openvpn.initd | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/main/openvpn/openvpn.initd b/main/openvpn/openvpn.initd index 5a07cdd7e5..2b6ddacbfa 100644 --- a/main/openvpn/openvpn.initd +++ b/main/openvpn/openvpn.initd @@ -5,8 +5,8 @@ description="VPN service" VPNDIR=${VPNDIR:-/etc/openvpn} -VPN=${SVCNAME#*.} -if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then +VPN=${RC_SVCNAME#*.} +if [ -n "${VPN}" ] && [ ${RC_SVCNAME} != "openvpn" ]; then VPNPID="/var/run/openvpn.${VPN}.pid" else VPNPID="/var/run/openvpn.pid" @@ -41,7 +41,7 @@ start() { # then we don't actually want to start openvpn [ "${IN_BACKGROUND}" = "true" ] && return 0 - ebegin "Starting ${SVCNAME}" + ebegin "Starting ${RC_SVCNAME}" checkconfig || return 1 @@ -68,7 +68,7 @@ start() { ewarn "WARNING: You have defined your own up/down scripts" ewarn "As you're running as a client, we now force Alpine specific" ewarn "scripts to be run for up and down events." - ewarn "These scripts will call /etc/openvpn/${SVCNAME}-{up,down}.sh" + ewarn "These scripts will call /etc/openvpn/${RC_SVCNAME}-{up,down}.sh" ewarn "where you can put your own code." fi @@ -88,10 +88,10 @@ start() { # Ensure that our scripts get the PEER_DNS variable [ -n "${PEER_DNS}" ] && args="${args} --setenv PEER_DNS ${PEER_DNS}" - [ "${reenter}" = "yes" ] && mark_service_inactive "${SVCNAME}" + [ "${reenter}" = "yes" ] && mark_service_inactive "${RC_SVCNAME}" start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \ -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon \ - --setenv SVCNAME "${SVCNAME}" ${args} + --setenv RC_SVCNAME "${RC_SVCNAME}" ${args} eend $? "Check your logs to see why startup failed" } @@ -99,11 +99,11 @@ stop() { # If we are re-called by the openvpn gentoo-down.sh script # then we don't actually want to stop openvpn if [ "${IN_BACKGROUND}" = "true" ] ; then - mark_service_inactive "${SVCNAME}" + mark_service_inactive "${RC_SVCNAME}" return 0 fi - ebegin "Stopping ${SVCNAME}" + ebegin "Stopping ${RC_SVCNAME}" start-stop-daemon --stop --quiet \ --exec /usr/sbin/openvpn --pidfile "${VPNPID}" eend $? |