2020-11-10 01:04:20 +02:00
|
|
|
#!/bin/sh
|
2024-04-19 12:00:37 +03:00
|
|
|
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
|
2024-04-19 12:00:37 +03:00
|
|
|
echo "Please pass an argument: up, down"
|
|
|
|
exit 1
|
2020-11-10 01:04:20 +02:00
|
|
|
fi
|
2024-04-19 12:00:37 +03:00
|
|
|
doas wg-quick $cmd
|