Merge branch 'master' into 1.6-dev.unstable

This commit is contained in:
Ben Peddell 2016-09-17 20:07:59 +10:00
commit f6af7b3bca

View File

@ -150,9 +150,6 @@ arkserverLog="arkserver.log" # here is logged the output of ShooterGameServer
appid="${appid:-376030}" appid="${appid:-376030}"
mod_appid="${mod_appid:-346110}" mod_appid="${mod_appid:-346110}"
arkautorestartfile="${arkautorestartfile:-ShooterGame/Saved/.autorestart}"
arkserverpidfile="${arkserverpidfile:-ShooterGame/Saved/.arkserver.pid}"
arkmanagerpidfile="${arkmanagerpidfile:-ShooterGame/Saved/.arkmanager.pid}"
install_bindir="${install_bindir:-${0%/*}}" install_bindir="${install_bindir:-${0%/*}}"
install_libexecdir="${install_libexecdir:-${install_bindir%/*}/libexec/arkmanager}" install_libexecdir="${install_libexecdir:-${install_bindir%/*}/libexec/arkmanager}"
@ -875,7 +872,7 @@ doRun() {
# start function # start function
# #
doStart() { doStart() {
touch "${arkserverroot}/.startAfterUpdate" touch "${arkserverroot}/.startAfterUpdate-${instance}"
if [ -f "${arkserverroot}/.ark-update.lock" ]; then if [ -f "${arkserverroot}/.ark-update.lock" ]; then
local updatepid="$(<"${arkserverroot}/.ark-update.lock")" local updatepid="$(<"${arkserverroot}/.ark-update.lock")"
@ -943,7 +940,7 @@ doStartAll(){
# #
doStop() { doStop() {
if [ "$1" != "update" ]; then if [ "$1" != "update" ]; then
rm -f "${arkserverroot}/.startAfterUpdate" rm -f "${arkserverroot}/.startAfterUpdate-${instance}"
fi fi
if isTheServerRunning; then if isTheServerRunning; then
@ -1537,6 +1534,9 @@ doUpdate() {
fi fi
done done
fi fi
if [ -z "$bgupdate" ]; then
touch "${arkserverroot}/steamapps/appmanifest_${appid}.acf"
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"
@ -1547,9 +1547,8 @@ doUpdate() {
if ! isTheServerRunning; then if ! isTheServerRunning; then
# we restart the server only if it was started before the update # we restart the server only if it was started before the update
if [ -z "$noautostart" ]; then if [ -z "$noautostart" ]; then
if [ $serverWasAlive -eq 1 ] || [ -f "${arkserverroot}/.startAfterUpdate" ]; then if [ $serverWasAlive -eq 1 ] || [ -f "${arkserverroot}/.startAfterUpdate-${instance}" ]; then
rm -f "${arkserverroot}/.startAfterUpdate" rm -f "${arkserverroot}/.startAfterUpdate-${instance}"
rm -f "${arkserverroot}/.ark-update.lock"
doStart --noautoupdate doStart --noautoupdate
fi fi
fi fi
@ -2372,6 +2371,9 @@ useConfig() {
echo "Error: arkserverroot not set" echo "Error: arkserverroot not set"
exit 1 exit 1
fi fi
arkautorestartfile="${arkautorestartfile:-ShooterGame/Saved/.autorestart-${1}}"
arkserverpidfile="${arkserverpidfile:-ShooterGame/Saved/.arkserver-${1}.pid}"
arkmanagerpidfile="${arkmanagerpidfile:-ShooterGame/Saved/.arkmanager-${1}.pid}"
} }
showUsage() { showUsage() {