mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-23 23:18:28 +00:00
Merge pull request #364 from klightspeed/1.5-dev#autoupdate
Add option to automatically update on startup
This commit is contained in:
commit
ac807bf74b
@ -678,6 +678,12 @@ doStart() {
|
|||||||
if isTheServerRunning; then
|
if isTheServerRunning; then
|
||||||
echo "The server is already running"
|
echo "The server is already running"
|
||||||
else
|
else
|
||||||
|
if [ "$arkAutoUpdateOnStart" == "true" ]; then
|
||||||
|
if ! [[ " $* " =~ " --noautoupdate " ]]; then
|
||||||
|
echo "Updating server"
|
||||||
|
doUpdate --update-mods
|
||||||
|
fi
|
||||||
|
fi
|
||||||
tput sc
|
tput sc
|
||||||
echo "The server is starting..."
|
echo "The server is starting..."
|
||||||
|
|
||||||
@ -1092,7 +1098,7 @@ doUpdate() {
|
|||||||
|
|
||||||
# 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 --noautoupdate
|
||||||
fi
|
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}."
|
||||||
@ -1739,7 +1745,7 @@ while true; do
|
|||||||
doRun
|
doRun
|
||||||
;;
|
;;
|
||||||
start)
|
start)
|
||||||
doStart
|
doStart "${options[@]}"
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
doStop shutdown "${options[@]}"
|
doStop shutdown "${options[@]}"
|
||||||
@ -1796,7 +1802,7 @@ while true; do
|
|||||||
for instance in "${instances[@]}"; do
|
for instance in "${instances[@]}"; do
|
||||||
(
|
(
|
||||||
useConfig "$instance"
|
useConfig "$instance"
|
||||||
doStart
|
doStart "${options[@]}"
|
||||||
echo "`timestamp`: start" >> "$logdir/$arkmanagerLog"
|
echo "`timestamp`: start" >> "$logdir/$arkmanagerLog"
|
||||||
echo "`timestamp`: restart" >> "$logdir/$arkmanagerLog"
|
echo "`timestamp`: restart" >> "$logdir/$arkmanagerLog"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -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
|
||||||
|
arkAutoUpdateOnStart="false" # set this to true if you want to always update before startup
|
||||||
arkBackupPreUpdate="false" # set this to true if you want to perform a backup before updating
|
arkBackupPreUpdate="false" # set this to true if you want to perform a backup before updating
|
||||||
#arkStagingDir="/home/steam/ARK-Staging" # Uncomment to enable updates to be fully downloaded before restarting the server (reduces downtime while updating)
|
#arkStagingDir="/home/steam/ARK-Staging" # Uncomment to enable updates to be fully downloaded before restarting the server (reduces downtime while updating)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user