diff --git a/tools/arkmanager b/tools/arkmanager index 0f1b6fa..d3cea38 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -63,14 +63,6 @@ function checkForUpdate(){ fi } -# -# Set the new current version in a file -# -function setCurrentVersion(){ - cd "$arkserverroot" - echo $bnumber > arkversion -} - # # Check if the server need to be updated # Return 0 if update is needed, else return 1 @@ -119,6 +111,7 @@ function parseSteamACF(){ function getCurrentVersion(){ if [ -f "${arkserverroot}/steamapps/appmanifest_${appid}.acf" ]; then instver=`while read name val; do if [ "${name}" == "{" ]; then parseSteamACF "" "buildid"; break; fi; done <"${arkserverroot}/steamapps/appmanifest_${appid}.acf"` + echo $instver > "$arkserverroot/arkversion" else instver="" fi @@ -229,8 +222,7 @@ doInstall() { # install the server ./$steamcmdexec +login anonymous +force_install_dir "$arkserverroot" +app_update $appid validate +quit # the current version should be the last version. We set our version - getAvailableVersion - setCurrentVersion + getCurrentVersion } # @@ -257,8 +249,7 @@ forceUpdate(){ cd "$steamcmdroot" ./$steamcmdexec +login anonymous +force_install_dir "$arkserverroot" +app_update $appid +quit # the current version should be the last version. We set our version - getAvailableVersion - setCurrentVersion + getCurrentVersion echo "$timestamp: update to $instver complete" >> "$logdir/update.log" # we restart the server only if it was started before the update