Преглед на файлове

fix(stop): send one stopped alert for GoldSrc servers (#5200)

Stop mode 9 (GoldSrc) sent the stopped alert straight after sending
"quit", without checking the server had stopped. GoldSrc restarts on
"quit", so the tmux session was then killed as a fallback and that path
sent the stopped alert again.

The GoldSrc path now only sends the alert when the server has really
stopped, so the tmux fallback sends the single alert.

Fixes #4772
Daniel Gibbs преди 13 часа
родител
ревизия
c5fd6f1c8e
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      lgsm/modules/command_stop.sh

+ 2 - 1
lgsm/modules/command_stop.sh

@@ -286,7 +286,8 @@ fn_stop_graceful_goldsrc() {
 	fn_print_ok "Graceful: sending \"quit\": ${seconds}"
 	fn_print_ok_eol_nl
 	fn_script_log_pass "Graceful: sending \"quit\": OK: ${seconds} seconds"
-	if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then
+	check_status.sh
+	if [ "${status}" == "0" ] && [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then
 		alert="stopped"
 		alert.sh
 	fi