This commit is contained in:
2025-10-31 09:18:08 +01:00
parent c8d52e2ee3
commit fd4598401d

View File

@@ -61,11 +61,9 @@ usage () {
# Function inputcheck # Function inputcheck
# #
inputcheck () { inputcheck () {
[[ -z "$hostname" ]] && { usage; echo ""; echo "Error! Hostname empty."; echo ""; exit 1; } [[ -z "$hostname" ]] && { usage; echo "ERROR: DOMAIN CANNOT BE EMPTY!"; exit 1; }
[[ "$hostname" =~ [[:space:]/] ]] && { echo "ERROR: DOMAIN INVALID (no spaces or slashes allowed)"; exit 1; } [[ "$hostname" =~ [[:space:]/] ]] && { echo "ERROR: DOMAIN INVALID (no spaces or slashes allowed)"; exit 1; }
[[ -z "$dbname" ]] && { usage; echo ""; echo "Error! Database name empty."; echo ""; exit 1; } [[ -z "$dbpass" ]] && { usage; echo "ERROR: DATABASE PASSWORD CANNOT BE EMPTY!"; exit 1; }
[[ -z "$dbuser" ]] && { usage; echo ""; echo "Error! Database user empty."; echo ""; exit 1; }
[[ -z "$dbpass" ]] && { usage; echo ""; echo "Error! Database password empty."; echo ""; exit 1; }
} }
# #
@@ -249,3 +247,4 @@ printf "\nAll Done...\n\n"
# #
# End of script # End of script
#