diff --git a/setup.sh b/setup.sh index 6b81b6e..68cdd04 100755 --- a/setup.sh +++ b/setup.sh @@ -46,7 +46,11 @@ case "$primary_region" in ;; esac -prompt admin_username 'Forgejo admin username' 'admin' +prompt admin_username 'Forgejo admin username' +if [ "${admin_username,,}" = admin ]; then + printf 'The username "admin" is reserved by Forgejo. Choose another username.\n' >&2 + exit 1 +fi case "$admin_username" in -*|*-|*[!A-Za-z0-9._-]*) printf 'The Forgejo username may only contain letters, numbers, ., _, and internal hyphens.\n' >&2