mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 10:50:16 +00:00
fix(scripts): disallow using server's name as client name (#1791)
This commit is contained in:
parent
701a817fed
commit
a85d3752ef
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue