diff --git a/wire_g b/wire_g index 11dda7c..c1661f1 100755 --- a/wire_g +++ b/wire_g @@ -90,10 +90,15 @@ import_wg(){ wg_stop nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt wg_notify + kill $pid + wire_g + else nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt wg_notify + kill $pid + wire_g fi fi ;; @@ -149,8 +154,8 @@ remove(){ if [ "$selection" = "$active" ] then pkill wire_g - kill yad - sleep 1 ; wire_g + pkill yad + wire_g fi fi } export -f remove @@ -172,6 +177,8 @@ up_or_down(){ --center --buttons-layout=center --borders=8 else wg_stop + kill $pid + wire_g fi } export -f up_or_down