swapping to handling wg-quick instead of nordvpn

This commit is contained in:
Siina Mashek 2024-04-19 12:00:37 +03:00
parent 126d737d9d
commit 077da0dad0

View file

@ -1,12 +1,14 @@
#!/bin/sh
if [ "$1" == "on" ]; then
cmd="c P2P"
elif [ "$1" == "off" ]; then
cmd="d"
elif [ "$1" == "status" ]; then
cmd="status"
else
echo "Please pass an argument: on, off, status"
exit
if [ ! -n "$VPN_NODE" ]; then
echo "Please set VPN_NODE"
exit 2
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