pid test 12
This commit is contained in:
parent
e4cf040c49
commit
cc6ebb3206
7
wire_g
7
wire_g
@ -217,7 +217,8 @@ connect(){
|
|||||||
if success=$(grep -i 'erfolgreich aktiviert\|successfully activated' ${wg_wdir}.tmp.txt)
|
if success=$(grep -i 'erfolgreich aktiviert\|successfully activated' ${wg_wdir}.tmp.txt)
|
||||||
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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user