mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
more disabled in brackets
This commit is contained in:
parent
6009e52e74
commit
a3b7af869c
3 changed files with 5 additions and 5 deletions
|
@ -12,8 +12,8 @@
|
||||||
|
|
||||||
|
|
||||||
######## VARIABLES #########
|
######## VARIABLES #########
|
||||||
pivpnGitUrl="https://github.com/pivpn/pivpn.git"
|
#pivpnGitUrl="https://github.com/pivpn/pivpn.git"
|
||||||
#pivpnGitUrl="/home/pi/repos/pivpn"
|
pivpnGitUrl="/home/pi/repos/pivpn"
|
||||||
setupVarsFile="setupVars.conf"
|
setupVarsFile="setupVars.conf"
|
||||||
setupConfigDir="/etc/pivpn"
|
setupConfigDir="/etc/pivpn"
|
||||||
tempsetupVarsFile="/tmp/setupVars.conf"
|
tempsetupVarsFile="/tmp/setupVars.conf"
|
||||||
|
|
|
@ -51,7 +51,7 @@ if [ ! -s configs/clients.txt ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DISPLAY_DISABLED" ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ for CLIENT_NAME in "${CLIENTS_TO_CHANGE[@]}"; do
|
||||||
|
|
||||||
# Enable the peer section from the server config
|
# Enable the peer section from the server config
|
||||||
echo "${CLIENT_NAME}"
|
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"
|
echo "::: Updated server config"
|
||||||
|
|
||||||
((CHANGED_COUNT++))
|
((CHANGED_COUNT++))
|
||||||
|
|
|
@ -30,4 +30,4 @@ done < clients.txt
|
||||||
|
|
||||||
cd /etc/wireguard || return
|
cd /etc/wireguard || return
|
||||||
echo "::: Disabled clients :::"
|
echo "::: Disabled clients :::"
|
||||||
grep 'disabled### begin' wg0.conf | sed 's/#//g; s/begin//'
|
grep '\[disabled\] ### begin' wg0.conf | sed 's/#//g; s/begin//'
|
||||||
|
|
Loading…
Reference in a new issue