diff --git a/mariadbinstall b/mariadbinstall index 90c2a58..06037d7 100755 --- a/mariadbinstall +++ b/mariadbinstall @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# SPDX-License-Identifier: MIT # Author : Allan Christensen # First Created : 05012022 (DD-MM-YYYY) @@ -12,7 +11,7 @@ if [[ $(id -u) -ne 0 ]]; then echo "" && echo "Must be root or use sudo" && echo "" ; exit 1 ; fi # -# Check if services are allready running +# Check if services are already running # for svc in mariadb; do if systemctl is-active --quiet "$svc"; then printf "\n%s is already running, cannot continue...\n\n" "${svc^}" ; exit 1 ; fi ; done @@ -41,7 +40,7 @@ printf -- " sudo ./mariadbinstall -u adminuser -p strongpass\n\n" clear # -# Check if no arguments were given or if -u og -p is missing or malformed +# Check if no arguments were given or if -u or -p is missing or malformed # if [[ $# -eq 0 ]]; then usage ; printf "ERROR: -u and -p REQUIRED!\n\n" ; exit 1 ; fi @@ -99,7 +98,7 @@ if [[ "$adminuser" == "root" ]]; then fi # -# Username: only allow a-zA-Z0-9_.- +# Username should only allow a-zA-Z0-9_.- # if [[ ! "$adminuser" =~ ^[a-zA-Z0-9_.-]+$ ]]; then printf "\nERROR: Username contains invalid characters.\n" @@ -108,7 +107,7 @@ if [[ ! "$adminuser" =~ ^[a-zA-Z0-9_.-]+$ ]]; then fi # -# Password: disallow spaces and backslashes, warn about weak passwords +# Password disallow spaces and backslashes # if [[ "$adminpwd" =~ [[:space:]] ]]; then printf "\nERROR: Password cannot contain spaces.\n\n"