shutdown old other wireguard connection

This commit is contained in:
Niklas 2020-10-14 16:45:01 +02:00
parent f1980d9437
commit ac2da01c86

View File

@ -10,12 +10,14 @@ source "$SCRIPTPATH/wireguard-config.sh"
if nmcli connection show --active | grep "$ID_LIGHT" > /dev/null
then
nmcli connection up "$ID_FULL"
nmcli connection down "$ID_LIGHT"
exit 0
fi
if nmcli connection show --active | grep "$ID_FULL" > /dev/null
then
nmcli connection up "$ID_LIGHT"
nmcli connection up "$ID_LIGHT"
nmcli connection down "$ID_FULL"
exit 0
fi