From 83e9ce1df3a45f27988cbf495c22d4f9dedc1095 Mon Sep 17 00:00:00 2001 From: punix Date: Sat, 11 Nov 2023 19:41:43 +0100 Subject: [PATCH] =?UTF-8?q?test=20pid=209=20kill=20$pid=20in=20funktionen?= =?UTF-8?q?=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wire_g | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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