diff --git a/wire_g b/wire_g index 6d59617..9a63b1b 100755 --- a/wire_g +++ b/wire_g @@ -89,18 +89,13 @@ import_wg(){ then wg_stop nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt - wg_notify - kill -n $pid - wire_g - - + wg_notify else nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt wg_notify - kill -n $pid - wire_g - fi + kill -n $pid + wire_g fi ;; *) yad --button=$"OK" --title=$"Wireguard .conf Select file" \ @@ -138,19 +133,21 @@ remove(){ then nmcli connection delete $selection &> ${wg_wdir}.tmp.txt if success=$(grep -i 'erfolgreich gelöscht\|successfully deleted' ${wg_wdir}.tmp.txt) - then + then yad --window-icon=${wg_pic}wg-trash.png \ --image-on-top --image=${wg_pic}wg-info.png \ --text=$"Your tunnel $selection was successfully deleted." \ --text-align=center --button=$"OK" --title "Wire-G Trash" \ - --center --buttons-layout=center --borders=8 + --center --buttons-layout=center --borders=8 else yad --window-icon=${wg_pic}wg-trash.png \ --image-on-top --image=${wg_pic}wg-info.png \ --text=$"Oh something went wrong.\nPlease delete tunnel in the network manager." \ --text-align=center --button=$"OK" --title "Wire-G Trash" \ - --center --buttons-layout=center --borders=8 - fi + --center --buttons-layout=center --borders=8 + fi + kill -n $pid + wire_g if [ "$selection" = "$active" ] then pkill wire_g