mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-20 05:58:27 +00:00
Restart the server if it was updated while running
This commit is contained in:
parent
0c2bb68b2e
commit
3dc8ef100e
@ -986,6 +986,7 @@ doWarn(){
|
|||||||
#
|
#
|
||||||
doUpdate() {
|
doUpdate() {
|
||||||
local appupdate=
|
local appupdate=
|
||||||
|
local bgupdate=
|
||||||
local updatetype=normal
|
local updatetype=normal
|
||||||
local validate=
|
local validate=
|
||||||
local modupdate=
|
local modupdate=
|
||||||
@ -1082,6 +1083,11 @@ doUpdate() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -f "$arkserverroot/$arkautorestartfile" && "$arkserverroot/$arkautorestartfile" -ot "${arkserverroot}/steamapps/appmanifest_${appid}.acf" ]]; then
|
||||||
|
echo "Server was updated while it was running"
|
||||||
|
bgupdate=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$downloadonly" ]; then
|
if [ -n "$downloadonly" ]; then
|
||||||
if [ -n "$appupdate" -a -n "$arkStagingDir" -a "$arkStagingDir" != "$arkserverroot" ]; then
|
if [ -n "$appupdate" -a -n "$arkStagingDir" -a "$arkStagingDir" != "$arkserverroot" ]; then
|
||||||
echo "Server update downloaded"
|
echo "Server update downloaded"
|
||||||
@ -1090,7 +1096,7 @@ doUpdate() {
|
|||||||
echo "Mod update downloaded"
|
echo "Mod update downloaded"
|
||||||
fi
|
fi
|
||||||
echo "Not applying update - download-only enabled"
|
echo "Not applying update - download-only enabled"
|
||||||
elif [ -n "$appupdate" -o -n "$modupdate" ]; then
|
elif [ -n "$appupdate" -o -n "$modupdate" -o -n "$bgupdate" ]; then
|
||||||
if isTheServerRunning; then
|
if isTheServerRunning; then
|
||||||
if [ "$updatetype" == "safe" ]; then
|
if [ "$updatetype" == "safe" ]; then
|
||||||
while [ ! `find $arkserverroot/ShooterGame/Saved/SavedArks -mmin -1 -name ${serverMap##*/}.ark` ]; do
|
while [ ! `find $arkserverroot/ShooterGame/Saved/SavedArks -mmin -1 -name ${serverMap##*/}.ark` ]; do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user