Skip to content

Commit

Permalink
fix(scripts): disallow using server's name as client name (#1791)
Browse files Browse the repository at this point in the history
  • Loading branch information
orazioedoardo committed Dec 13, 2023
1 parent 701a817 commit a85d375
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/wireguard/makeCONF.sh
Expand Up @@ -49,6 +49,9 @@ checkName() {
elif [[ -z "${CLIENT_NAME}" ]]; then
err "::: You cannot leave the name blank."
exit 1
elif [[ "${CLIENT_NAME}" == "server" ]]; then
err "Sorry, this is in use by the server and cannot be used by clients."
exit 1
elif [[ -f "configs/${CLIENT_NAME}.conf" ]]; then
err "::: A client with this name already exists"
exit 1
Expand Down

0 comments on commit a85d375

Please sign in to comment.