diff --git a/wire_g b/wire_g index a31a83b..3ac1902 100755 --- a/wire_g +++ b/wire_g @@ -104,9 +104,10 @@ import_wg(){ kill $lines nmcli connection import type wireguard file $WG_CONF &> ${WG_WDIR}.tmp.txt wg_notify - fi - nmcli con mod "$WG_CONF" connection.autoconnect no + fi nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//' &> ${WG_WDIR}onstart.txt + IFS=$'\n' WG_START=( $(cat ${WG_WDIR}onstart.txt) ) + nmcli con mod "$WG_START" connection.autoconnect no fi ;; *) yad --image-on-top --image=${WG_PIC}wg-info.png --height=150 --width=240 \