mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-15 03:58:27 +00:00
Improves the backup on-request feature
This commit is contained in:
parent
94b3138988
commit
115f0c3ce7
@ -592,6 +592,8 @@ doUpdate() {
|
||||
saveworld=1
|
||||
elif [ "$arg" == "--update-mods" ]; then
|
||||
modupdate=1
|
||||
elif [ "$arg" == "--backup" ]; then
|
||||
arkBackupPreUpdate=true
|
||||
fi
|
||||
done
|
||||
|
||||
@ -637,11 +639,14 @@ doUpdate() {
|
||||
fi
|
||||
|
||||
doStop
|
||||
|
||||
# If user wants to back-up, we do it here.
|
||||
|
||||
if [ "$arkBackupPreUpdate" == "true" ]; then
|
||||
doBackup
|
||||
fi
|
||||
|
||||
if [ -n "$appupdate" ]; then
|
||||
if [ "$arkBackupPreUpdate" == "true" ]; then
|
||||
doBackup
|
||||
fi
|
||||
cd "$steamcmdroot"
|
||||
./$steamcmdexec +login anonymous +force_install_dir "$arkserverroot" +app_update $appid $validate +quit
|
||||
# the current version should be the last version. We set our version
|
||||
@ -657,7 +662,7 @@ doUpdate() {
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# we restart the server only if it was started before the update
|
||||
if [ $serverWasAlive -eq 1 ]; then
|
||||
doStart
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user