mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-21 22:38:26 +00:00
support paths with spaces
This commit is contained in:
parent
b3aa2a5722
commit
f13091a674
@ -56,7 +56,7 @@ function checkForUpdate(){
|
|||||||
# Set the new current version in a file
|
# Set the new current version in a file
|
||||||
#
|
#
|
||||||
function setCurrentVersion(){
|
function setCurrentVersion(){
|
||||||
cd $arkserverroot
|
cd "$arkserverroot"
|
||||||
echo $bnumber > arkversion
|
echo $bnumber > arkversion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ function isUpdateNeeded(){
|
|||||||
# Return the current version number
|
# Return the current version number
|
||||||
#
|
#
|
||||||
function getCurrentVersion(){
|
function getCurrentVersion(){
|
||||||
cd $arkserverroot
|
cd "$arkserverroot"
|
||||||
touch arkversion # If the file doesn't exist
|
touch arkversion # If the file doesn't exist
|
||||||
instver=`cat "arkversion"`
|
instver=`cat "arkversion"`
|
||||||
return $instver
|
return $instver
|
||||||
@ -151,7 +151,7 @@ doStop() {
|
|||||||
doInstall() {
|
doInstall() {
|
||||||
mkdir -p $arkserverroot
|
mkdir -p $arkserverroot
|
||||||
|
|
||||||
cd $steamcmdroot
|
cd "$steamcmdroot"
|
||||||
# install the server
|
# install the server
|
||||||
./$steamcmdexec +login anonymous +force_install_dir "$arkserverroot" +app_update $appid validate +quit
|
./$steamcmdexec +login anonymous +force_install_dir "$arkserverroot" +app_update $appid validate +quit
|
||||||
# the current version should be the last version. We set our version
|
# the current version should be the last version. We set our version
|
||||||
@ -163,7 +163,7 @@ doInstall() {
|
|||||||
# Stop the server, update it and then start it back.
|
# Stop the server, update it and then start it back.
|
||||||
#
|
#
|
||||||
doUpdate() {
|
doUpdate() {
|
||||||
cd $arkserverroot
|
cd "$arkserverroot"
|
||||||
|
|
||||||
if isUpdateNeeded; then
|
if isUpdateNeeded; then
|
||||||
# check if the server was alive before the update so we can launch it back after the update
|
# check if the server was alive before the update so we can launch it back after the update
|
||||||
@ -172,11 +172,11 @@ doUpdate() {
|
|||||||
serverWasAlive=1
|
serverWasAlive=1
|
||||||
fi
|
fi
|
||||||
doStop
|
doStop
|
||||||
cd $steamcmdroot
|
cd "$steamcmdroot"
|
||||||
./$steamcmdexec +login anonymous +force_install_dir "$arkserverroot" +app_update $appid +quit
|
./$steamcmdexec +login anonymous +force_install_dir "$arkserverroot" +app_update $appid +quit
|
||||||
cd $logdir
|
cd "$logdir"
|
||||||
echo "$bnumber" > "$arkserverroot/arkversion"
|
echo "$bnumber" > "$arkserverroot/arkversion"
|
||||||
cd $steamcmdroot
|
cd "$steamcmdroot"
|
||||||
echo "$timestamp: update to $bnumber complete" >> "$logdir/update.log"
|
echo "$timestamp: update to $bnumber complete" >> "$logdir/update.log"
|
||||||
|
|
||||||
# we restart the server only if it was started before the update
|
# we restart the server only if it was started before the update
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user