mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-17 12:48:28 +00:00
Use getCurrentVersion after update
This commit is contained in:
parent
b76424ecaa
commit
3462be3066
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user