mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 10:50:16 +00:00
fix(scripts): Match full client name when disabling
This fix prevents "pivpn -off" from failing to disable a client when another client is already disabled and the disabled client name starts with the client name you're trying to disable. e.g. "user-1" wasn't able to be disabled if "user" was already disabled.
This commit is contained in:
parent
16189edc7b
commit
f9ae9662ec
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ for CLIENT_NAME in "${CLIENTS_TO_CHANGE[@]}"; do
|
|||
|
||||
if ! grep -q "^${CLIENT_NAME} " configs/clients.txt; then
|
||||
echo -e "::: \e[1m${CLIENT_NAME}\e[0m does not exist"
|
||||
elif grep -q "#\[disabled\] ### begin ${CLIENT_NAME}" wg0.conf; then
|
||||
elif grep -q "#\[disabled\] ### begin ${CLIENT_NAME} ###" wg0.conf; then
|
||||
echo -e "::: \e[1m${CLIENT_NAME}\e[0m is already disabled"
|
||||
else
|
||||
if [[ -n "${CONFIRM}" ]]; then
|
||||
|
|
Loading…
Reference in a new issue