selection if abfrage angepasst (else hinzugefügt)

This commit is contained in:
Désiré Werner Menrath 2023-10-30 18:31:27 +01:00
parent 35373f4e4e
commit 5dbd782306

6
wire_g
View File

@ -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 #########################################################