mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-14 19:48:27 +00:00
Add '-MapModId' support
Specifying the Modded Map by ModID was added in 193.0 This adds support for this, and backups should work with it.
This commit is contained in:
parent
2e8e3b6aaa
commit
0aa7546b06
@ -284,6 +284,10 @@ function isTheServerUp(){
|
||||
doRun() {
|
||||
arkserveropts="$serverMap"
|
||||
|
||||
if [ -n "$serverMapModId" ]; then
|
||||
arkserveropts="-MapModID=$serverMapModId"
|
||||
fi
|
||||
|
||||
# bring in ark_... options
|
||||
for varname in "${!ark_@}"; do
|
||||
name="${varname#ark_}"
|
||||
@ -442,6 +446,20 @@ doBackup(){
|
||||
local backupdir="${arkbackupdir}/${datestamp}"
|
||||
mkdir -p "$backupdir"
|
||||
|
||||
# extract the map name from the active map mod
|
||||
if [ -n "$serverMapModId" ]; then
|
||||
serverMap="$(perl -e '
|
||||
my $data;
|
||||
{ local $/; $data = <>; }
|
||||
my $mapnamelen = unpack("@0 L<", $data);
|
||||
my $mapname = substr($data, 4, $mapnamelen - 1);
|
||||
$mapnamelen += 4;
|
||||
my $mapfilelen = unpack("@" . ($mapnamelen + 4) . " L<", $data);
|
||||
my $mapfile = substr($data, $mapnamelen + 8, $mapfilelen - 1);
|
||||
print $mapfile;
|
||||
' <"${arkserverroot}/ShooterGame/Content/Mods/${serverMapModId}/mod.info")"
|
||||
fi
|
||||
|
||||
# ARK server uses Write-Unlink-Rename
|
||||
echo -ne "${NORMAL} Copying ARK world file "
|
||||
cp -p "${arkserverroot}/ShooterGame/Saved/SavedArks/${serverMap##*/}.ark" "${backupdir}/${serverMap##*/}.ark"
|
||||
|
||||
@ -16,6 +16,7 @@ arkbackupdir="/home/steam/ARK-Backups" # path to ba
|
||||
# comment out these values if you want to define them
|
||||
# inside your GameUserSettings.ini file
|
||||
serverMap="TheIsland" # server map (default TheIsland)
|
||||
#serverMapModId="469987622" # Uncomment this to specify the Map Mod Id (<fileid> in http://steamcommunity.com/sharedfiles/filedetails/?id=<fileid>)
|
||||
ark_RCONEnabled="True" # Enable RCON Protocol
|
||||
ark_RCONPort="32330" # RCON Port
|
||||
ark_SessionName="ARK Server Tools" # if your session name needs special characters please use the .ini instead
|
||||
@ -24,6 +25,7 @@ ark_QueryPort="27016" # ARK query
|
||||
ark_ServerPassword="" # ARK server password, empty: no password required to login
|
||||
ark_ServerAdminPassword="keyboardcat" # ARK server admin password, KEEP IT SAFE!
|
||||
ark_MaxPlayers="70"
|
||||
#ark_GameModIds="487516323,487516324,487516325" # Uncomment to specify additional mods by Mod Id separated by commas
|
||||
|
||||
# config Service
|
||||
servicename="arkserv" # Name of the service (don't change if you don't know what are you doing)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user