From 1bb8963979e402708d2b53da8adae9ff2b9f9457 Mon Sep 17 00:00:00 2001 From: punix Date: Thu, 9 Nov 2023 17:14:02 +0100 Subject: [PATCH] =?UTF-8?q?tunnel=20doppelpr=C3=BCfung2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wire_g | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/wire_g b/wire_g index 25a2157..d3c13a3 100755 --- a/wire_g +++ b/wire_g @@ -85,22 +85,22 @@ import_wg(){ --width=1200 --height=800 \ --window-icon=${wg_pic}wg-import.png \ --title=$"Wireguard .conf Select file") - - IFS=$'\n' lines=( $(cat ${wg_wdir}.tunnel.txt) ) - for wgconf in "${lines[@]}" - 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" - break - done then case "$wgconf" in *_*.conf) if grep -i 'PEER\|PublicKey' $wgconf > /dev/null && grep -i 'Interface\|PrivateKey' $wgconf > /dev/null - then + then + IFS=$'\n' lines=( $(cat ${wg_wdir}.tunnel.txt) ) + for wgconf in "${lines[@]}" + 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" + break + wire_g + done active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//') if [[ -n $active ]] then