test 13 pid

This commit is contained in:
Désiré Werner Menrath 2023-11-11 20:00:28 +01:00
parent cc6ebb3206
commit a666c7f915

10
wire_g
View File

@ -90,14 +90,14 @@ 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 kill -n $pid
wire_g 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 kill -n $pid
wire_g wire_g
fi fi
@ -177,7 +177,7 @@ up_or_down(){
--center --buttons-layout=center --borders=8 --center --buttons-layout=center --borders=8
else else
wg_stop wg_stop
kill $pid kill -n $pid
wire_g wire_g
fi } fi }
@ -247,12 +247,12 @@ if selection=$(yad --no-klick --list --center \
nmcli connection up $selection &> ${wg_wdir}.tmp.txt nmcli connection up $selection &> ${wg_wdir}.tmp.txt
connect connect
pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}') pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
kill $pid kill -n $pid
else else
nmcli connection up $selection &> ${wg_wdir}.tmp.txt nmcli connection up $selection &> ${wg_wdir}.tmp.txt
connect connect
pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}') pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
kill $pid kill -n $pid
fi fi
fi fi