mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-20 14:08:26 +00:00
Perform online check even with arkAlwaysRestartOnCrash
This commit is contained in:
parent
47a668fff4
commit
eb5f86e112
@ -1125,6 +1125,7 @@ doRun() {
|
|||||||
# Disable auto-restart so we don't get caught in a restart loop
|
# Disable auto-restart so we don't get caught in a restart loop
|
||||||
rm -f "$arkserverroot/$arkautorestartfile"
|
rm -f "$arkserverroot/$arkautorestartfile"
|
||||||
restartserver=0
|
restartserver=0
|
||||||
|
serveronline=0
|
||||||
if [ -n "$arkAlwaysRestartOnCrash" ]; then
|
if [ -n "$arkAlwaysRestartOnCrash" ]; then
|
||||||
restartserver=1
|
restartserver=1
|
||||||
touch "$arkserverroot/$arkautorestartfile"
|
touch "$arkserverroot/$arkautorestartfile"
|
||||||
@ -1139,14 +1140,17 @@ doRun() {
|
|||||||
local pid="`getServerPID`"
|
local pid="`getServerPID`"
|
||||||
if [ "$pid" == "$serverpid" ]; then
|
if [ "$pid" == "$serverpid" ]; then
|
||||||
serverdowntries=0
|
serverdowntries=0
|
||||||
if [ "$restartserver" -eq 0 ]; then
|
if [ "$serveronline" -eq 0 ]; then
|
||||||
# Check if the server has fully started
|
# Check if the server has fully started
|
||||||
if ! isTheServerUp; then
|
if ! isTheServerUp; then
|
||||||
# Enable auto-restart if the server is up
|
# Enable auto-restart if the server is up
|
||||||
echo "`timestamp`: server is up"
|
echo "`timestamp`: server is up"
|
||||||
notify "${notifyMsgServerUp:-Server is up}"
|
notify "${notifyMsgServerUp:-Server is up}"
|
||||||
touch "$arkserverroot/$arkautorestartfile"
|
if [ "$restartserver" -eq 0 ]; then
|
||||||
restartserver=1
|
touch "$arkserverroot/$arkautorestartfile"
|
||||||
|
restartserver=1
|
||||||
|
fi
|
||||||
|
serveronline=1
|
||||||
fi
|
fi
|
||||||
elif isTheServerUp; then
|
elif isTheServerUp; then
|
||||||
(( serverdowntries++ ))
|
(( serverdowntries++ ))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user