@@ -223,12 +223,12 @@ arkwarnshutdownminutes="5"
223
223
arkwarnrestartminutes="5"
224
224
arkwarnupdateminutes="5"
225
225
226
- msgWarnUpdateMinutes="This ARK server will shutdown for an update in %d minutes "
227
- msgWarnUpdateSeconds="This ARK server will shutdown for an update in %d seconds "
228
- msgWarnRestartMinutes="This ARK server will shutdown for a restart in %d minutes "
229
- msgWarnRestartSeconds="This ARK server will shutdown for a restart in %d seconds "
230
- msgWarnShutdownMinutes="This ARK server will shutdown in %d minutes "
231
- msgWarnShutdownSeconds="This ARK server will shutdown in %d seconds "
226
+ msgWarnUpdateMinutes="Survivors, a server update will begin in %d minute(s). Please prepare for shutdown. "
227
+ msgWarnUpdateSeconds="Survivors, a server update will begin in %d second(s). Brace for shutdown. "
228
+ msgWarnRestartMinutes="Heads up! Server restart in %d minute(s). Wrap up your activities. "
229
+ msgWarnRestartSeconds="Heads up! Server restart in %d second(s). "
230
+ msgWarnShutdownMinutes="Warning: this ARK server will power down in %d minute(s). "
231
+ msgWarnShutdownSeconds="Warning: this ARK server will power down in %d second(s). "
232
232
233
233
# ===============================================================================
234
234
# PATHS AND LOGGING
@@ -433,41 +433,6 @@ monitor_server_status() {
433
433
done
434
434
}
435
435
436
- # ===============================================================================
437
- # SHUTDOWN MONITORING
438
- # ===============================================================================
439
-
440
- # Function to monitor for server shutdown message and exit container
441
- monitor_shutdown () {
442
- local log_file=" /home/container/log/arkmanager.log"
443
- local check_interval=2 # Check every 2 seconds
444
-
445
- # Wait a bit before starting to monitor
446
- sleep 5
447
-
448
- while true ; do
449
- # Check if log file exists and monitor for shutdown message
450
- if [[ -f " ${log_file} " ]]; then
451
- if tail -n 20 " ${log_file} " 2> /dev/null | grep -q " The server has been stopped" ; then
452
- log_info " Server shutdown detected - stopping container"
453
- # Kill any background monitoring processes
454
- [[ -n " ${STATUS_MONITOR_PID} " ]] && kill " ${STATUS_MONITOR_PID} " 2> /dev/null
455
- [[ -n " ${SHUTDOWN_MONITOR_PID} " ]] && kill " ${SHUTDOWN_MONITOR_PID} " 2> /dev/null
456
- # Give processes a moment to clean up
457
- sleep 2
458
- # For Pelican Panel - kill all processes and exit
459
- pkill -f " ShooterGameServer" 2> /dev/null || true
460
- pkill -f " arkmanager" 2> /dev/null || true
461
- pkill -f " bash" 2> /dev/null || true
462
- # Force exit the entrypoint script
463
- kill -TERM $$ 2> /dev/null || kill -KILL $$ 2> /dev/null || exit 0
464
- fi
465
- fi
466
-
467
- sleep ${check_interval}
468
- done
469
- }
470
-
471
436
# ===============================================================================
472
437
# STARTUP EXECUTION
473
438
# ===============================================================================
506
471
507
472
log_server " Starting server with command: ${MODIFIED_STARTUP} "
508
473
509
- # Start shutdown monitoring in background
510
- monitor_shutdown &
511
- SHUTDOWN_MONITOR_PID=$!
512
-
513
474
# Start server status monitoring in background
514
475
monitor_server_status &
515
476
STATUS_MONITOR_PID=$!
0 commit comments