local-bin/common/vpn

15 lines
257 B
Plaintext
Raw Normal View History

2020-11-10 01:04:20 +02:00
#!/bin/sh
if [ ! -n "$VPN_NODE" ]; then
echo "Please set VPN_NODE"
exit 2
fi
if [ "$1" == "up" ]; then
cmd="up $VPN_NODE"
elif [ "$1" == "down" ]; then
cmd="down $VPN_NODE"
2020-11-10 01:04:20 +02:00
else
echo "Please pass an argument: up, down"
exit 1
2020-11-10 01:04:20 +02:00
fi
doas wg-quick $cmd