From 2990a01cd000353bcd5d79e9bcaad1636d8f07a4 Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Mon, 17 Aug 2020 20:14:05 +0200 Subject: vpn-{start,stop}: shellscript fixes and update /run directory location --- mageia/usr/sbin/vpn-start | 6 +++--- mageia/usr/sbin/vpn-stop | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mageia/usr/sbin/vpn-start b/mageia/usr/sbin/vpn-start index 49a02cf1..18cef8d2 100755 --- a/mageia/usr/sbin/vpn-start +++ b/mageia/usr/sbin/vpn-start @@ -9,7 +9,7 @@ fi DIR=/etc/sysconfig/network-scripts/vpn.d/"$TYPE" CONFIG="$DIR"/"$NAME".conf -PID=/var/run/"$TYPE"-"$NAME".pid +PID=/run/"$TYPE"-"$NAME".pid . /etc/init.d/functions @@ -24,10 +24,10 @@ case $TYPE in exit 1 ;; openvpn) - action "Starting VPN connection: " openvpn --user openvpn --group openvpn --daemon --writepid $PID --config $CONFIG --cd $DIR $* + action "Starting VPN connection: " openvpn --user openvpn --group openvpn --daemon --writepid "$PID" --config "$CONFIG" --cd "$DIR" $* ;; vpnc) - action "Starting VPN connection: " /usr/sbin/vpnc $CONFIG --pid-file $PID $* + action "Starting VPN connection: " /usr/sbin/vpnc "$CONFIG" --pid-file "$PID" $* ;; *) gprintf "Connection type $TYPE is not supported.\n"; diff --git a/mageia/usr/sbin/vpn-stop b/mageia/usr/sbin/vpn-stop index 048c909f..48863868 100755 --- a/mageia/usr/sbin/vpn-stop +++ b/mageia/usr/sbin/vpn-stop @@ -6,7 +6,7 @@ if [ -z "$TYPE" ] || [ -z "$NAME" ]; then echo "usage: $0: " fi -PID=/var/run/"$TYPE"-"$NAME".pid +PID=/run/"$TYPE"-"$NAME".pid . /etc/init.d/functions if [ -e "$PID" ]; then -- cgit v1.2.1