Ver Fonte

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 há 13 horas atrás
pai
commit
c5fd6f1c8e
1 ficheiros alterados com 2 adições e 1 exclusões
  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