From ac2da01c860ee6435c8eae7afd46d165f3bdd38b Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 14 Oct 2020 16:45:01 +0200 Subject: [PATCH] shutdown old other wireguard connection --- .config/polybar/wireguard-switch.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/polybar/wireguard-switch.sh b/.config/polybar/wireguard-switch.sh index cdbaa31..d9fe26f 100755 --- a/.config/polybar/wireguard-switch.sh +++ b/.config/polybar/wireguard-switch.sh @@ -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