diff --git a/wire_g b/wire_g index 511136a..ec09099 100755 --- a/wire_g +++ b/wire_g @@ -91,13 +91,12 @@ import_wg(){ *_*.conf) if grep -i 'PEER\|PublicKey' $wgconf > /dev/null && grep -i 'Interface\|PrivateKey' $wgconf > /dev/null then - for wgconf in $(cat ${wg_wdir}.tunnel.txt) + while [ grep -i $wgconf ${wg_wdir}.tunnel.txt ] do yad --window-icon=${wg_pic}wg-stop.png \ --image=${wg_pic}wg-info.png --button "OK" \ --text "Tunnelname existiert schon." \ --text-align=center --title=$"Wireguard .conf Select file" - exit 0 & wire_g done active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//') if [[ -n $active ]]