mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-24 15:38:26 +00:00
Merge forceUpdate into doUpdate
This commit is contained in:
parent
9b5435fe49
commit
39c649d296
@ -540,32 +540,29 @@ doUpdate() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
forceUpdate
|
# check if the server was alive before the update so we can launch it back after the update
|
||||||
|
serverWasAlive=0
|
||||||
|
if isTheServerRunning ;then
|
||||||
|
serverWasAlive=1
|
||||||
|
fi
|
||||||
|
doStop
|
||||||
|
|
||||||
|
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
|
||||||
|
getCurrentVersion
|
||||||
|
echo "`timestamp`: update to $instver complete" >> "$logdir/update.log"
|
||||||
|
|
||||||
|
# we restart the server only if it was started before the update
|
||||||
|
if [ $serverWasAlive -eq 1 ]; then
|
||||||
|
doStart
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Your server is already up to date! The most recent version is ${bnumber}."
|
echo "Your server is already up to date! The most recent version is ${bnumber}."
|
||||||
echo "`timestamp`: No update needed." >> "$logdir/update.log"
|
echo "`timestamp`: No update needed." >> "$logdir/update.log"
|
||||||
fi;
|
fi;
|
||||||
}
|
}
|
||||||
|
|
||||||
forceUpdate(){
|
|
||||||
# check if the server was alive before the update so we can launch it back after the update
|
|
||||||
serverWasAlive=0
|
|
||||||
if isTheServerRunning ;then
|
|
||||||
serverWasAlive=1
|
|
||||||
fi
|
|
||||||
doStop
|
|
||||||
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
|
|
||||||
getCurrentVersion
|
|
||||||
echo "`timestamp`: update to $instver complete" >> "$logdir/update.log"
|
|
||||||
|
|
||||||
# we restart the server only if it was started before the update
|
|
||||||
if [ $serverWasAlive -eq 1 ]; then
|
|
||||||
doStart
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Downloads mod and installs it into mods directory
|
# Downloads mod and installs it into mods directory
|
||||||
#
|
#
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user