shutdown old other wireguard connection
This commit is contained in:
parent
f1980d9437
commit
ac2da01c86
@ -10,12 +10,14 @@ source "$SCRIPTPATH/wireguard-config.sh"
|
|||||||
if nmcli connection show --active | grep "$ID_LIGHT" > /dev/null
|
if nmcli connection show --active | grep "$ID_LIGHT" > /dev/null
|
||||||
then
|
then
|
||||||
nmcli connection up "$ID_FULL"
|
nmcli connection up "$ID_FULL"
|
||||||
|
nmcli connection down "$ID_LIGHT"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if nmcli connection show --active | grep "$ID_FULL" > /dev/null
|
if nmcli connection show --active | grep "$ID_FULL" > /dev/null
|
||||||
then
|
then
|
||||||
nmcli connection up "$ID_LIGHT"
|
nmcli connection up "$ID_LIGHT"
|
||||||
|
nmcli connection down "$ID_FULL"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user