Skip to content

Commit 6716839

Browse files
committed
feat: add steamcmd checking to monitor
1 parent 9d699ee commit 6716839

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

lgsm/functions/check.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if [ "${commandname}" != "INSTALL" ] && [ "${commandname}" != "UPDATE-LGSM" ] &&
3131
check_system_dir.sh
3232
fi
3333

34-
allowed_commands_array=(START DEBUG)
34+
allowed_commands_array=(DEBUG START)
3535
for allowed_command in "${allowed_commands_array[@]}"; do
3636
if [ "${allowed_command}" == "${commandname}" ]; then
3737
check_executable.sh
@@ -47,7 +47,7 @@ if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then
4747
done
4848
fi
4949

50-
allowed_commands_array=(BACKUP CONSOLE DEBUG DETAILS MAP-COMPRESSOR FASTDL MODS-INSTALL MODS-REMOVE MODS-UPDATE MONITOR POST-DETAILS RESTART START STOP TEST-ALERT CHANGE-PASSWORD UPDATE UPDATE-LGSM VALIDATE WIPE)
50+
allowed_commands_array=(BACKUP CHANGE-PASSWORD CONSOLE DEBUG DETAILS FASTDL MAP-COMPRESSOR MODS-INSTALL MODS-REMOVE MODS-UPDATE MONITOR POST-DETAILS RESTART START STOP TEST-ALERT UPDATE UPDATE-LGSM VALIDATE WIPE)
5151
for allowed_command in "${allowed_commands_array[@]}"; do
5252
if [ "${allowed_command}" == "${commandname}" ]; then
5353
check_logs.sh
@@ -68,7 +68,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do
6868
fi
6969
done
7070

71-
allowed_commands_array=(DEBUG DETAILS DEV-QUERY-RAW MONITOR POST_DETAILS START STOP POST-DETAILS)
71+
allowed_commands_array=(DEBUG DETAILS DEV-QUERY-RAW MONITOR POST-DETAILS START STOP)
7272
for allowed_command in "${allowed_commands_array[@]}"; do
7373
if [ "${allowed_command}" == "${commandname}" ]; then
7474
if [ -z "${installflag}" ]; then
@@ -77,7 +77,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do
7777
fi
7878
done
7979

80-
allowed_commands_array=(DEBUG START UPDATE VALIDATE CHECK-UPDATE)
80+
allowed_commands_array=(CHECK-UPDATE DEBUG MONITOR START UPDATE VALIDATE)
8181
for allowed_command in "${allowed_commands_array[@]}"; do
8282
if [ "${allowed_command}" == "${commandname}" ]; then
8383
if [ "${appid}" ]; then
@@ -86,7 +86,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do
8686
fi
8787
done
8888

89-
allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS)
89+
allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR POST-DETAILS START STOP UPDATE VALIDATE)
9090
for allowed_command in "${allowed_commands_array[@]}"; do
9191
if [ "${allowed_command}" == "${commandname}" ]; then
9292
check_status.sh

lgsm/modules/command_monitor.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,10 @@ fn_monitor_check_update() {
7272
# Monitor will check if an update is running.
7373
if [ "$(pgrep -fc "${selfname} update")" != "0" ] || [ "$(pgrep -fc "${selfname} u")" != "0" ] || [ "$(pgrep -fc "${selfname} validate")" != "0" ] || [ "$(pgrep -fc "${selfname} v")" != "0" ]; then
7474
# Specific check for docker. Will ignore the command watch -n 1800 ./csgoserver update
75-
if [ "$(pgrep -fc "n*${selfname} update")" != "0" ]; then
76-
fn_print_dots "Checking active updates: "
77-
fn_print_checking_eol
78-
fn_script_log_info "Checking active updates: CHECKING"
79-
fn_print_info_nl "Checking active updates: SteamCMD is currently checking for updates: "
75+
if [ "$(pgrep -fc "n*${selfname} update")" == "0" ]; then
76+
fn_print_info_nl "Checking lockfile: LinuxGSM is currently checking for updates: "
8077
fn_print_info_eol
81-
fn_script_log_pass "Checking active updates: SteamCMD is currently checking for updates"
78+
fn_script_log_pass "Checking lockfile: LinuxGSM is currently checking for updates"
8279
core_exit.sh
8380
fi
8481
fi

0 commit comments

Comments
 (0)