diff --git a/wire_g b/wire_g index 6bb9527..400e46a 100755 --- a/wire_g +++ b/wire_g @@ -173,9 +173,15 @@ selection=$(yad --no-click --list \ --column 'Auswahl' $tunnel) if [ "$?" = "0" ] then + active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//') + if [ -n $active ] + then wg_stop nmcli connection up $selection &> ${wg_wdir}.tmp.txt connect + else + nmcli connection up $selection &> ${wg_wdir}.tmp.txt + connect fi ############################################ ENDE #########################################################