test pid 9 kill $pid in funktionen hinzugefügt

This commit is contained in:
Désiré Werner Menrath 2023-11-11 19:41:43 +01:00
parent e1093fbc31
commit 83e9ce1df3

11
wire_g
View File

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