diff --git a/README.md b/README.md index f9a1662..f461b7c 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ ark_ServerPVE=False ark_DifficultyOffset=1 ``` -Your session name may contain special characters (eg. `!![EU]!! Aw&some ARK`) which could break the startup command. -In this case you may want to comment out the `ark_SessionName` variable and define it inside your **GameUserSettings.ini** file. +Your session name may not contain special characters (eg. `!![EU]!! Aw&some ARK`) as it could break the startup command. +In this case you may want to comment out the `ark_SessionName` variable and define it inside your **GameUserSettings.ini** file instead. You can override or add variables for a specific system user creating a file called `.arkmanager.cfg` in the home directory of the system user. diff --git a/tools/arkmanager b/tools/arkmanager index 0db7ed1..3cd0921 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -100,14 +100,6 @@ function checkForUpdate(){ fi } -# -# Set the new current version in a file -# -function setCurrentVersion(){ - cd "$arkserverroot" - echo $bnumber > arkversion -} - # # Check if the server need to be updated # Return 0 if update is needed, else return 1 @@ -156,6 +148,7 @@ function parseSteamACF(){ function getCurrentVersion(){ if [ -f "${arkserverroot}/steamapps/appmanifest_${appid}.acf" ]; then instver=`while read name val; do if [ "${name}" == "{" ]; then parseSteamACF "" "buildid"; break; fi; done <"${arkserverroot}/steamapps/appmanifest_${appid}.acf"` + echo $instver > "$arkserverroot/arkversion" else instver="" fi @@ -268,8 +261,7 @@ doInstall() { # install the server ./$steamcmdexec +login anonymous +force_install_dir "$arkserverroot" +app_update $appid validate +quit # the current version should be the last version. We set our version - getAvailableVersion - setCurrentVersion + getCurrentVersion } # @@ -296,8 +288,7 @@ forceUpdate(){ cd "$steamcmdroot" ./$steamcmdexec +login anonymous +force_install_dir "$arkserverroot" +app_update $appid +quit # the current version should be the last version. We set our version - getAvailableVersion - setCurrentVersion + getCurrentVersion echo "$timestamp: update to $instver complete" >> "$logdir/update.log" # we restart the server only if it was started before the update diff --git a/tools/install.sh b/tools/install.sh index 420aba1..55d249c 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -86,7 +86,10 @@ if [ ! -z "$1" ]; then # Copy arkmanager.cfg inside linux configuation folder if it doesn't already exists mkdir -p "${INSTALL_ROOT}/etc/arkmanager" if [ -f "${INSTALL_ROOT}/etc/arkmanager/arkmanager.cfg" ]; then + cp -n arkmanager.cfg "${INSTALL_ROOT}/etc/arkmanager/arkmanager.cfg.NEW" + chown "$1" "${INSTALL_ROOT}/etc/arkmanager/arkmanager.cfg.NEW" echo "A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it." + echo "A copy of the new configuration file was included in /etc/arkmanager. Make sure to review any changes and update your config accordingly!" exit 2 else cp -n arkmanager.cfg "${INSTALL_ROOT}/etc/arkmanager/arkmanager.cfg"