pid test 12

This commit is contained in:
Désiré Werner Menrath 2023-11-11 19:51:44 +01:00
parent e4cf040c49
commit cc6ebb3206

5
wire_g
View File

@ -218,6 +218,7 @@ connect(){
then then
nmcli con mod $selection connection.autoconnect no nmcli con mod $selection connection.autoconnect no
wg_notify wg_notify
wire_g
fi } fi }
# function end # function end
@ -246,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 && wire_g kill $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 && wire_g kill $pid
fi fi
fi fi