This commit is contained in:
Georg Lauterbach 2021-03-24 20:42:00 +01:00 committed by GitHub
parent c214cba981
commit 4afebda64d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 76 additions and 74 deletions

View file

@ -47,8 +47,11 @@ touch "${DATABASE}"
(
flock -e 200
grep -qi "^$(escape "${USER}")|" "${DATABASE}" 2>/dev/null &&
errex "User \"${USER}\" already exists"
if grep -qi "^$(escape "${USER}")|" "${DATABASE}" 2>/dev/null
then
echo "User '${USER}' already exists."
exit 1
fi
if [[ -z ${PASSWD} ]]
then