mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-11 02:28:27 +00:00
Add options to overwrite GameUserSettings.ini and Game.ini
This commit is contained in:
parent
36b8a3e7fd
commit
d52f49ba27
@ -538,6 +538,21 @@ crash-restart loop if the cause of the crash is not resolved.
|
||||
`arkBackupPreUpdate`::
|
||||
Set to `true` to enable automatic backups before updating
|
||||
|
||||
`arkPreStart`::
|
||||
Set to the path to a script to execute on startup if it exists
|
||||
+
|
||||
default: /path/to/instance/config.start
|
||||
|
||||
`arkGameUserSettingsIniFile`::
|
||||
Set to the path to an ini file to replace GameUserSettings.ini on startup if it exists
|
||||
+
|
||||
default: /path/to/instance/config.GameUserSettings.ini
|
||||
|
||||
`arkGameIniFile`::
|
||||
Set to the path to an ini file to replace Game.ini on startup if it exists
|
||||
+
|
||||
default: /path/to/instance/config.Game.ini
|
||||
|
||||
`arkStagingDir`::
|
||||
Sets the staging directory in order to download updates
|
||||
before shutting down the server
|
||||
|
||||
@ -1311,12 +1311,32 @@ doStart() {
|
||||
if [ -n "$serverpid" ] && kill -0 "$serverpid"; then
|
||||
logprint "Start aborted due to server already running - pid: $serverpid"
|
||||
else
|
||||
local saverootdir="${arkserverroot}/${arkserverdir}/Saved"
|
||||
local savedcfgdir="${saverootdir}/Config/LinuxServer"
|
||||
local prestart="${configfile%.cfg}.start"
|
||||
local gusini="${configfile%.cfg}.GameUserSettings.ini"
|
||||
local gameini="${configfile%.cfg}.Game.ini"
|
||||
|
||||
if [ -n "${arkGameUserSettingsIniFile}" ]; then
|
||||
gusini="${arkGameUserSettingsIniFile}"
|
||||
fi
|
||||
|
||||
if [ -n "${arkGameIniFile}" ]; then
|
||||
gameini="${arkGameIniFile}"
|
||||
fi
|
||||
|
||||
if [ -n "${arkPreStart}" ]; then
|
||||
prestart="${arkPreStart}"
|
||||
fi
|
||||
|
||||
if [[ -n "${gusini}" && -f "${gusini}" ]]; then
|
||||
cp "${gusini}" "${savedcfgdir}/GameUserSettings.ini"
|
||||
fi
|
||||
|
||||
if [[ -n "${gameini}" && -f "${gameini}" ]]; then
|
||||
cp "${gameini}" "${savedcfgdir}/Game.ini"
|
||||
fi
|
||||
|
||||
if [[ -n "${prestart}" && -f "${prestart}" ]]; then
|
||||
if [ -x "${prestart}" ]; then
|
||||
"${prestart}" "$@"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user