Browse Source

change stop mode

pull/3212/head
Daniel Gibbs 5 years ago
parent
commit
109cc02e8b
  1. 3
      lgsm/config-default/config-lgsm/vhserver/_default.cfg
  2. 22
      lgsm/functions/command_stop.sh

3
lgsm/config-default/config-lgsm/vhserver/_default.cfg

@ -136,8 +136,7 @@ steammaster="false"
# 9: GoldSrc # 9: GoldSrc
# 10: Avorion # 10: Avorion
# 11: end # 11: end
# 12: Valheim stopmode="2"
stopmode="12"
## Query mode ## Query mode
# 1: session only # 1: session only

22
lgsm/functions/command_stop.sh

@ -208,26 +208,6 @@ fn_stop_graceful_avorion(){
fi fi
} }
# Attempts graceful shutdown of valheim using the developer's
# custom half-baked shutdown procedure. Up till now, the game does
# not support any signals.
fn_stop_graceful_valheim(){
fn_print_dots "Graceful: echo 1 to server_exit.drp"
fn_script_log_info "Graceful: echo 1 to server_exit.drp"
# sends quit
echo 1 > "${serverfiles}"/server_exit.drp
# Animate dots for shutdown period
for seconds in {1..10}; do
sleep 1
fn_print_dots "Graceful: echo 1 to server_exit.drp: ${seconds}"
done
fn_print_ok "Graceful: echo 1 to server_exit.drp: ${seconds}: "
fn_print_ok_eol_nl
fn_script_log_pass "Graceful: echo 1 to server_exit.drp: OK: ${seconds} seconds"
}
fn_stop_graceful_select(){ fn_stop_graceful_select(){
if [ "${stopmode}" == "1" ]; then if [ "${stopmode}" == "1" ]; then
fn_stop_tmux fn_stop_tmux
@ -251,8 +231,6 @@ fn_stop_graceful_select(){
fn_stop_graceful_avorion fn_stop_graceful_avorion
elif [ "${stopmode}" == "11" ]; then elif [ "${stopmode}" == "11" ]; then
fn_stop_graceful_cmd "end" 30 fn_stop_graceful_cmd "end" 30
elif [ "${stopmode}" == "12" ]; then
fn_stop_graceful_valheim
fi fi
} }

Loading…
Cancel
Save