From f4900382063e8f36a99d8e7b3f775166b4e6c01f Mon Sep 17 00:00:00 2001 From: H3o66 Date: Sat, 9 Jan 2021 17:11:39 +0100 Subject: [PATCH 1/2] refactor(stop): add stop mode ctrl+c and quit --- lgsm/functions/command_stop.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 6fe06e4efb..60c7d84712 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -231,6 +231,16 @@ fn_stop_graceful_select(){ fn_stop_graceful_avorion elif [ "${stopmode}" == "11" ]; then fn_stop_graceful_cmd "end" 30 + elif [ "${stopmode}" == "12" ]; then + # special stop for CSGO - needed if "-autoupdate" is set as launch option + # send a ctrl + c and after that use the quit method + fn_print_info_nl "Step 1: Graceful: CTRL+c" + fn_script_log_info "Step 1: Graceful: CTRL+c" + tmux send-keys -t "${sessionname}" C-c &> /dev/null + # send quit to stop the server in the end + fn_print_info_nl "Step 2: Graceful: quit" + fn_script_log_info "Step 2: Graceful: quit" + fn_stop_graceful_cmd "quit" 30 fi } From 0758277de062b1c560b5a86be00c590db5814a40 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 16 Jan 2021 15:43:38 +0000 Subject: [PATCH 2/2] change csgo stop mode to 9 --- .../config-default/config-lgsm/csgoserver/_default.cfg | 2 +- lgsm/functions/command_stop.sh | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 2ed74049e3..9b87ee58cf 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -157,7 +157,7 @@ steammaster="true" # 9: GoldSrc # 10: Avorion # 11: end -stopmode="3" +stopmode="9" ## Query mode # 1: session only diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 60c7d84712..6fe06e4efb 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -231,16 +231,6 @@ fn_stop_graceful_select(){ fn_stop_graceful_avorion elif [ "${stopmode}" == "11" ]; then fn_stop_graceful_cmd "end" 30 - elif [ "${stopmode}" == "12" ]; then - # special stop for CSGO - needed if "-autoupdate" is set as launch option - # send a ctrl + c and after that use the quit method - fn_print_info_nl "Step 1: Graceful: CTRL+c" - fn_script_log_info "Step 1: Graceful: CTRL+c" - tmux send-keys -t "${sessionname}" C-c &> /dev/null - # send quit to stop the server in the end - fn_print_info_nl "Step 2: Graceful: quit" - fn_script_log_info "Step 2: Graceful: quit" - fn_stop_graceful_cmd "quit" 30 fi }