1
0
Fork 0
mirror of https://github.com/pivpn/pivpn.git synced 2024-12-20 20:00:16 +00:00

fix(scripts): disallow using server's name as client name ()

This commit is contained in:
Orazio 2023-12-13 18:09:55 +01:00 committed by GitHub
parent 701a817fed
commit a85d3752ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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