diff --git a/tools/arkmanager b/tools/arkmanager index 7bb8aeb..32568f6 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -661,6 +661,12 @@ doStart() { if isTheServerRunning; then echo "The server is already running" else + if [ "$arkAutoUpdateOnStart" == "true" ]; then + if ! [[ " $* " =~ " --noautoupdate " ]]; then + echo "Updating server" + doUpdate --update-mods + fi + fi tput sc echo "The server is starting..." @@ -1075,7 +1081,7 @@ doUpdate() { # we restart the server only if it was started before the update if [ $serverWasAlive -eq 1 ]; then - doStart + doStart --noautoupdate fi else echo "Your server is already up to date! The most recent version is ${bnumber}." diff --git a/tools/arkmanager.cfg b/tools/arkmanager.cfg index 9d8533a..fbee577 100644 --- a/tools/arkmanager.cfg +++ b/tools/arkmanager.cfg @@ -15,6 +15,7 @@ arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" # name of AR arkbackupdir="/home/steam/ARK-Backups" # path to backup directory arkwarnminutes="60" # number of minutes to warn players when using update --warn 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 #arkStagingDir="/home/steam/ARK-Staging" # Uncomment to enable updates to be fully downloaded before restarting the server (reduces downtime while updating)