change lock file name

This commit is contained in:
Daniel Gibbs 2024-06-15 21:53:58 +01:00
parent 5607a547c0
commit c0ba7219fd
No known key found for this signature in database
GPG Key ID: 2076B128385E8C55
2 changed files with 4 additions and 4 deletions

View File

@ -110,7 +110,7 @@ fn_monitor_check_stopping() {
}
fn_monitor_check_restart_request() {
if [ -f "${lockdir}/${selfname}-restart-request.lock" ]; then
if [ -f "${lockdir}/${selfname}-stop-request.lock" ]; then
fn_print_dots "Checking restart: "
fn_print_checking_eol
fn_print_info "Checking restart: Restart requested: "

View File

@ -20,11 +20,11 @@ fn_stop_players_online() {
if [ -n "${gdplayers}" ] && [ "${gdplayers}" -ne 0 ]; then
fn_print_info_nl "Server will not stop while ${gdplayers} players are on the server"
fn_script_log_info "Server will not stop while ${gdplayers} players are on the server"
date '+%s' > "${lockdir:?}/${selfname}-restart-request.lock"
date '+%s' > "${lockdir:?}/${selfname}-stop-request.lock"
core_exit.sh
else
if [ -f "${lockdir:?}/${selfname}-restart-request.lock" ]; then
rm -f "${lockdir:?}/${selfname}-restart-request.lock"
if [ -f "${lockdir:?}/${selfname}-stop-request.lock" ]; then
rm -f "${lockdir:?}/${selfname}-stop-request.lock"
fi
break
fi