diff --git a/wire_g b/wire_g index 9067ef7..33af434 100755 --- a/wire_g +++ b/wire_g @@ -243,14 +243,14 @@ if selection=$(yad --no-klick --list --center \ if [[ -n $active ]] then wg_stop - nmcli connection up $selection &> ${wg_wdir}.tmp.txt - export pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}') + nmcli connection up $selection &> ${wg_wdir}.tmp.txt connect + pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}') kill -n $pid else nmcli connection up $selection &> ${wg_wdir}.tmp.txt - export pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}') connect + pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}') kill -n $pid fi fi