diff options
author | Olav Vitters <olav@vitters.nl> | 2020-08-17 20:14:05 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2020-08-17 20:14:05 +0200 |
commit | 2990a01cd000353bcd5d79e9bcaad1636d8f07a4 (patch) | |
tree | 3ddff6096dfd7f71ecc7a18578f68fb49295c7b9 | |
parent | 3e6ac604337d5a0843e131dd72d8b4494d1b883c (diff) | |
download | initscripts-2990a01cd000353bcd5d79e9bcaad1636d8f07a4.tar initscripts-2990a01cd000353bcd5d79e9bcaad1636d8f07a4.tar.gz initscripts-2990a01cd000353bcd5d79e9bcaad1636d8f07a4.tar.bz2 initscripts-2990a01cd000353bcd5d79e9bcaad1636d8f07a4.tar.xz initscripts-2990a01cd000353bcd5d79e9bcaad1636d8f07a4.zip |
vpn-{start,stop}: shellscript fixes and update /run directory location
-rwxr-xr-x | mageia/usr/sbin/vpn-start | 6 | ||||
-rwxr-xr-x | 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: <VPN type> <VPN name>" fi -PID=/var/run/"$TYPE"-"$NAME".pid +PID=/run/"$TYPE"-"$NAME".pid . /etc/init.d/functions if [ -e "$PID" ]; then |