From d980a099ded9e882c8f3b86b3a5e89a44aa16d87 Mon Sep 17 00:00:00 2001 From: punix Date: Sun, 5 Nov 2023 11:07:20 +0100 Subject: [PATCH] remove-neu --- wire_g | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/wire_g b/wire_g index 8333145..ab45a3b 100755 --- a/wire_g +++ b/wire_g @@ -106,12 +106,18 @@ remove(){ nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//' &> ${wg_wdir}.wg_noactive.txt active=$(cat ${wg_wdir}.wg_noactive.txt) - if selection=$(yad --no-click --list --height=300 --width=60 \ - --title="Wire-G Trash" --center \ - --fixed --buttons-layout=center \ - --button=$"OK" --button=$"Cancel" \ - --separator="" --window-icon=${wg_pic}wg-trash.png \ - --borders=8 --column=$"Delete" $tunnel) + if selection=$(yad --no-click --list --center \ + --window-icon=${wg_pic}wg-trash.png \ + --height=300 --width=60 --title="Wire-G Trash" \ + --fixed --buttons-layout=center --separator="" \ + --button=$"OK" --button=$"Cancel" \ + --borders=8 --image-on-top --image=${wg_pic}wg-active.png \ + --column=$"Delete" $tunnel \ + --text=$"Activ Tunnel: $active +---------------------------------------------------------------------------------- +If no tunnels are listed, +so they have to import their tunnel beforehand.") + then nmcli connection delete $selection &> ${wg_wdir}.tmp.txt success=$(grep -i 'erfolgreich gelöscht\|successfully deleted' ${wg_wdir}.tmp.txt)