mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-11 18:48:26 +00:00
Merge pull request #1074 from MrSlimbrowser/preciseWarn
obey warn time even if no players are connected
This commit is contained in:
commit
9ee4e70e1d
@ -1776,17 +1776,19 @@ doWarn(){
|
||||
printWarnMessage "$1" "$2" "minutes" "$warnminutes" "$usenotify"
|
||||
usenotify=
|
||||
for (( min = warnminutes - 1; min >= warninterval; min-- )); do
|
||||
numplayers=$(numPlayersConnected)
|
||||
echo "There are ${numplayers} players connected"
|
||||
if [[ "numplayers" == "-1" ]]; then
|
||||
echo "Server is not running. Shutting down immediately"
|
||||
notify "${notifyMsgServerNotRunning:-Server is not running. Shutting down immediately}"
|
||||
return 0
|
||||
elif (( (numplayers + 0) == 0 )); then
|
||||
doBroadcastWithEcho "Nobody is connected. Shutting down immediately"
|
||||
notify "${notifyMsgNobodyConnected:-Nobody is connected. Shutting down immediately}"
|
||||
rm -f "${arkserverroot}/${arkwarnlockfile}"
|
||||
return 0
|
||||
if [ "$arkprecisewarn" != "true" ]; then
|
||||
numplayers=$(numPlayersConnected)
|
||||
echo "There are ${numplayers} players connected"
|
||||
if [[ "numplayers" == "-1" ]]; then
|
||||
echo "Server is not running. Shutting down immediately"
|
||||
notify "${notifyMsgServerNotRunning:-Server is not running. Shutting down immediately}"
|
||||
return 0
|
||||
elif (( (numplayers + 0) == 0 )); then
|
||||
doBroadcastWithEcho "Nobody is connected. Shutting down immediately"
|
||||
notify "${notifyMsgNobodyConnected:-Nobody is connected. Shutting down immediately}"
|
||||
rm -f "${arkserverroot}/${arkwarnlockfile}"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
if isUpdateCancelRequested; then
|
||||
doBroadcastWithEcho "Restart cancelled by player request"
|
||||
@ -1821,17 +1823,19 @@ doWarn(){
|
||||
printWarnMessage "$1" "$2" "seconds" "$warnseconds" "$usenotify"
|
||||
usenotify=
|
||||
if (( warnseconds >= 20 )); then
|
||||
numplayers=$(numPlayersConnected)
|
||||
echo "There are ${numplayers} players connected"
|
||||
if [[ "numplayers" == "-1" ]]; then
|
||||
echo "Server is not running. Shutting down immediately"
|
||||
notify "${notifyMsgServerNotRunning:-Server is not running. Shutting down immediately}"
|
||||
return 0
|
||||
elif (( (numplayers + 0) == 0 )); then
|
||||
doBroadcastWithEcho "Nobody is connected. Shutting down immediately"
|
||||
notify "${notifyMsgNobodyConnected:-Nobody is connected. Shutting down immediately}"
|
||||
rm -f "${arkserverroot}/${arkwarnlockfile}"
|
||||
return 0
|
||||
if [ "$arkprecisewarn" != "true" ]; then
|
||||
numplayers=$(numPlayersConnected)
|
||||
echo "There are ${numplayers} players connected"
|
||||
if [[ "numplayers" == "-1" ]]; then
|
||||
echo "Server is not running. Shutting down immediately"
|
||||
notify "${notifyMsgServerNotRunning:-Server is not running. Shutting down immediately}"
|
||||
return 0
|
||||
elif (( (numplayers + 0) == 0 )); then
|
||||
doBroadcastWithEcho "Nobody is connected. Shutting down immediately"
|
||||
notify "${notifyMsgNobodyConnected:-Nobody is connected. Shutting down immediately}"
|
||||
rm -f "${arkserverroot}/${arkwarnlockfile}"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
if isUpdateCancelRequested; then
|
||||
doBroadcastWithEcho "Restart cancelled by player request"
|
||||
|
||||
@ -16,6 +16,7 @@ steamcmd_workshoplog="/home/steam/Steam/logs/workshop_log.txt" # Steam work
|
||||
arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" # name of ARK server executable
|
||||
arkbackupdir="/home/steam/ARK-Backups" # path to backup directory
|
||||
arkwarnminutes="60" # number of minutes to warn players when using update --warn
|
||||
arkprecisewarn="false" # set this to true to obey warnminutes even if no players are connected (recommended for clusters)
|
||||
arkautorestartfile="ShooterGame/Saved/.autorestart" # path to autorestart file
|
||||
arkAutoUpdateOnStart="false" # set this to true if you want to always update before startup
|
||||
arkBackupPreUpdate="false" # set this to true if you want to perform a backup before updating
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user