Skip to content

Commit 079fe07

Browse files
authored
fix(vh): log a message when the password is not set or to short (#3738)
1 parent 0465e09 commit 079fe07

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lgsm/functions/check_config.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ elif [ -v rconpassword ]&&[ "${rconpassword}" == "CHANGE_ME" ]; then
2525
fn_print_warn_nl "Default RCON Password detected"
2626
fn_script_log_warn "Default RCON Password detected"
2727
fi
28+
29+
if [ "${shortname}" == "vh" ]&&[ -z "${serverpassword}" ]; then
30+
fn_print_fail_nl "serverpassword is not set"
31+
fn_script_log_fatal "serverpassword is not set"
32+
elif [ "${shortname}" == "vh" ]&&[ "${#serverpassword}" -le "4" ]; then
33+
fn_print_fail_nl "serverpassword is to short (min 5 chars)"
34+
fn_script_log_fatal "serverpassword is to short (min 5 chars)"
35+
fi

0 commit comments

Comments
 (0)