Browse Source

change lock file name

Daniel Gibbs 1 year ago
parent
commit
c0ba7219fd
2 changed files with 4 additions and 4 deletions
  1. 1 1
      lgsm/modules/command_monitor.sh
  2. 3 3
      lgsm/modules/command_stop.sh

+ 1 - 1
lgsm/modules/command_monitor.sh

@@ -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: "

+ 3 - 3
lgsm/modules/command_stop.sh

@@ -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