mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-20 05:58:27 +00:00
Merge pull request #184 from Atriusftw/feature/BackupPreUpdate
Allow backing up prior to updating the server
This commit is contained in:
commit
c9ddb5c87d
@ -97,6 +97,9 @@ Validates all ARK server files
|
|||||||
#### arkmanager update --update-mods
|
#### arkmanager update --update-mods
|
||||||
Updates installed and requested mods
|
Updates installed and requested mods
|
||||||
|
|
||||||
|
#### arkmanager update --backup
|
||||||
|
Takes a backup of the save files before updating.
|
||||||
|
|
||||||
#### arkmanager status
|
#### arkmanager status
|
||||||
Get the status of the server. Show if the process is running, if the server is up and the current version number
|
Get the status of the server. Show if the process is running, if the server is up and the current version number
|
||||||
|
|
||||||
|
|||||||
@ -692,6 +692,8 @@ doUpdate() {
|
|||||||
saveworld=1
|
saveworld=1
|
||||||
elif [ "$arg" == "--update-mods" ]; then
|
elif [ "$arg" == "--update-mods" ]; then
|
||||||
modupdate=1
|
modupdate=1
|
||||||
|
elif [ "$arg" == "--backup" ]; then
|
||||||
|
arkBackupPreUpdate=true
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -737,6 +739,12 @@ doUpdate() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
doStop
|
doStop
|
||||||
|
|
||||||
|
# If user wants to back-up, we do it here.
|
||||||
|
|
||||||
|
if [ "$arkBackupPreUpdate" == "true" ]; then
|
||||||
|
doBackup
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$appupdate" ]; then
|
if [ -n "$appupdate" ]; then
|
||||||
cd "$steamcmdroot"
|
cd "$steamcmdroot"
|
||||||
@ -754,7 +762,7 @@ doUpdate() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 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 [ $serverWasAlive -eq 1 ]; then
|
if [ $serverWasAlive -eq 1 ]; then
|
||||||
doStart
|
doStart
|
||||||
@ -1214,6 +1222,7 @@ while true; do
|
|||||||
echo " --validate Validates all ARK server files"
|
echo " --validate Validates all ARK server files"
|
||||||
echo " --saveworld Saves world before update"
|
echo " --saveworld Saves world before update"
|
||||||
echo " --update-mods Updates installed and requested mods"
|
echo " --update-mods Updates installed and requested mods"
|
||||||
|
echo " --backup Takes a backup of the save files before updating"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
@ -15,6 +15,7 @@ arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" # name of AR
|
|||||||
arkbackupdir="/home/steam/ARK-Backups" # path to backup directory
|
arkbackupdir="/home/steam/ARK-Backups" # path to backup directory
|
||||||
arkwarnminutes="60" # number of minutes to warn players when using update --warn
|
arkwarnminutes="60" # number of minutes to warn players when using update --warn
|
||||||
arkautorestartfile="ShooterGame/Saved/.autorestart" # path to autorestart file
|
arkautorestartfile="ShooterGame/Saved/.autorestart" # path to autorestart file
|
||||||
|
arkBackupPreUpdate="false" # set this to true if you want to perform a backup before updating
|
||||||
|
|
||||||
# Update warning messages
|
# Update warning messages
|
||||||
# Modify as desired, putting the %d replacement operator where the number belongs
|
# Modify as desired, putting the %d replacement operator where the number belongs
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user