swapping to handling wg-quick instead of nordvpn
This commit is contained in:
parent
126d737d9d
commit
077da0dad0
1 changed files with 12 additions and 10 deletions
22
common/vpn
22
common/vpn
|
@ -1,12 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ "$1" == "on" ]; then
|
if [ ! -n "$VPN_NODE" ]; then
|
||||||
cmd="c P2P"
|
echo "Please set VPN_NODE"
|
||||||
elif [ "$1" == "off" ]; then
|
exit 2
|
||||||
cmd="d"
|
|
||||||
elif [ "$1" == "status" ]; then
|
|
||||||
cmd="status"
|
|
||||||
else
|
|
||||||
echo "Please pass an argument: on, off, status"
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
nordvpn $cmd
|
if [ "$1" == "up" ]; then
|
||||||
|
cmd="up $VPN_NODE"
|
||||||
|
elif [ "$1" == "down" ]; then
|
||||||
|
cmd="down $VPN_NODE"
|
||||||
|
else
|
||||||
|
echo "Please pass an argument: up, down"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
doas wg-quick $cmd
|
||||||
|
|
Loading…
Reference in a new issue