From 87bdc70838208b0e9f2a93a9a4da175f78461df9 Mon Sep 17 00:00:00 2001 From: punix Date: Mon, 27 Nov 2023 12:44:08 +0100 Subject: [PATCH] fix autoconnect no --- wire_g | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 \