Sfoglia il codice sorgente

fix(vh): log a message when the password is not set or to short (#3738)

Christian 4 anni fa
parent
commit
079fe0766e
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      lgsm/functions/check_config.sh

+ 8 - 0
lgsm/functions/check_config.sh

@@ -25,3 +25,11 @@ elif [ -v rconpassword ]&&[ "${rconpassword}" == "CHANGE_ME" ]; then
 	fn_print_warn_nl "Default RCON Password detected"
 	fn_script_log_warn "Default RCON Password detected"
 fi
+
+if [ "${shortname}" == "vh" ]&&[ -z "${serverpassword}" ]; then
+	fn_print_fail_nl "serverpassword is not set"
+	fn_script_log_fatal "serverpassword is not set"
+elif [ "${shortname}" == "vh" ]&&[ "${#serverpassword}" -le "4" ]; then
+	fn_print_fail_nl "serverpassword is to short (min 5 chars)"
+	fn_script_log_fatal "serverpassword is to short (min 5 chars)"
+fi