pid test 12

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

7
wire_g
View File

@ -217,7 +217,8 @@ connect(){
if success=$(grep -i 'erfolgreich aktiviert\|successfully activated' ${wg_wdir}.tmp.txt)
then
nmcli con mod $selection connection.autoconnect no
wg_notify
wg_notify
wire_g
fi }
# function end
@ -246,12 +247,12 @@ if selection=$(yad --no-klick --list --center \
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
connect
pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
kill $pid && wire_g
kill $pid
else
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
connect
pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
kill $pid && wire_g
kill $pid
fi
fi