diff --git a/wire_g b/wire_g index 9a63b1b..a0ddfb7 100755 --- a/wire_g +++ b/wire_g @@ -237,18 +237,17 @@ if selection=$(yad --no-klick --list --center \ ---------------------------------------------------------------------------------- If no tunnels are listed, so they have to import their tunnel beforehand.") +export pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}') then if [[ -n $active ]] then wg_stop 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 connect - pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}') kill -n $pid fi fi