pid test 6

This commit is contained in:
Désiré Werner Menrath 2023-11-11 18:43:07 +01:00
parent 60abaa01ec
commit 5b0fc17c92

10
wire_g
View File

@ -42,6 +42,7 @@ wg_notify(){
a_user=$(whoami)
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
wg_pic="/home/$a_user/.icons/"
pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
case $LANG in
de_DE.UTF-8) open=öffnen ;;
@ -148,7 +149,7 @@ remove(){
if [ "$selection" = "$active" ]
then
pkill wire_g
pkill yad
kill "$pid"
fi
fi }
export -f remove
@ -236,13 +237,12 @@ if selection=$(yad --no-klick --list --center \
wg_stop
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
connect
export pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
bg $pid
pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
else
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
connect
export pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
bg $pid
pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
fi
fi