pid test 15
This commit is contained in:
parent
17a289ecef
commit
da7d4fe046
3
wire_g
3
wire_g
@ -237,18 +237,17 @@ if selection=$(yad --no-klick --list --center \
|
|||||||
<b>----------------------------------------------------------------------------------</b>
|
<b>----------------------------------------------------------------------------------</b>
|
||||||
<b>If no tunnels are listed,</b>
|
<b>If no tunnels are listed,</b>
|
||||||
<b>so they have to import their tunnel beforehand.</b>")
|
<b>so they have to import their tunnel beforehand.</b>")
|
||||||
|
export pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
|
||||||
then
|
then
|
||||||
if [[ -n $active ]]
|
if [[ -n $active ]]
|
||||||
then
|
then
|
||||||
wg_stop
|
wg_stop
|
||||||
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}')
|
|
||||||
kill -n $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}')
|
|
||||||
kill -n $pid
|
kill -n $pid
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user