From a3b7af869c7c06083bc875644010ce1e05546630 Mon Sep 17 00:00:00 2001 From: Roger Haxby <63857845+shelleycat485@users.noreply.github.com> Date: Wed, 9 Dec 2020 23:07:28 +0000 Subject: [PATCH] more disabled in brackets --- auto_install/install.sh | 4 ++-- scripts/wireguard/enableCONF.sh | 4 ++-- scripts/wireguard/listCONF.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index 421daeb..2691d48 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -12,8 +12,8 @@ ######## VARIABLES ######### -pivpnGitUrl="https://github.com/pivpn/pivpn.git" -#pivpnGitUrl="/home/pi/repos/pivpn" +#pivpnGitUrl="https://github.com/pivpn/pivpn.git" +pivpnGitUrl="/home/pi/repos/pivpn" setupVarsFile="setupVars.conf" setupConfigDir="/etc/pivpn" tempsetupVarsFile="/tmp/setupVars.conf" diff --git a/scripts/wireguard/enableCONF.sh b/scripts/wireguard/enableCONF.sh index dad65b6..b45395f 100755 --- a/scripts/wireguard/enableCONF.sh +++ b/scripts/wireguard/enableCONF.sh @@ -51,7 +51,7 @@ if [ ! -s configs/clients.txt ]; then fi if [ "$DISPLAY_DISABLED" ]; then - grep 'disabled### begin' wg0.conf | sed 's/#//g; s/begin//' + grep '\[disabled\] ### begin' wg0.conf | sed 's/#//g; s/begin//' exit 1 fi @@ -95,7 +95,7 @@ for CLIENT_NAME in "${CLIENTS_TO_CHANGE[@]}"; do # Enable the peer section from the server config echo "${CLIENT_NAME}" - sed -e "/begin ${CLIENT_NAME}/,/end ${CLIENT_NAME}/ s/#disabled//" -i wg0.conf + sed -e "/begin ${CLIENT_NAME}/,/end ${CLIENT_NAME}/ s/#\[disabled\] //" -i wg0.conf echo "::: Updated server config" ((CHANGED_COUNT++)) diff --git a/scripts/wireguard/listCONF.sh b/scripts/wireguard/listCONF.sh index a8f5e57..150eb5a 100755 --- a/scripts/wireguard/listCONF.sh +++ b/scripts/wireguard/listCONF.sh @@ -30,4 +30,4 @@ done < clients.txt cd /etc/wireguard || return echo "::: Disabled clients :::" -grep 'disabled### begin' wg0.conf | sed 's/#//g; s/begin//' +grep '\[disabled\] ### begin' wg0.conf | sed 's/#//g; s/begin//'