mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-15 20:08:29 +00:00
Add option to always auto-restart
This commit is contained in:
parent
55f9a80ddd
commit
794171e7e4
@ -742,6 +742,9 @@ doRun() {
|
||||
# Disable auto-restart so we don't get caught in a restart loop
|
||||
rm -f "$arkserverroot/$arkautorestartfile"
|
||||
restartserver=0
|
||||
if [ -n "$arkAlwaysRestartOnCrash" ]; then
|
||||
restartserver=1
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
|
||||
@ -762,6 +765,8 @@ doRun() {
|
||||
echo "`timestamp`: Bad PID '$pid'; expected '$serverpid'"
|
||||
if [ "$pid" != "" ]; then
|
||||
# Another instance must be running - disable autorestart
|
||||
echo "Error: another server instance is running from the same directory"
|
||||
echo "Aborting - two servers MUST NOT run from the same directory"
|
||||
restartserver=0
|
||||
fi
|
||||
break
|
||||
@ -797,6 +802,10 @@ doStart() {
|
||||
doUpdate --update-mods
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ " $* " =~ " --alwaysrestart " ]]; then
|
||||
arkAlwaysRestartOnCrash=true
|
||||
fi
|
||||
tput sc
|
||||
echo "The server is starting..."
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user