Add option to not decrement Port

This commit is contained in:
Ben Peddell 2020-06-14 23:12:09 +10:00
parent 8e5b78d665
commit f69ba15495
3 changed files with 6 additions and 1 deletions

View File

@ -729,6 +729,10 @@ ARK server options:
the `-StructureDestructionTag=DestroySwampSnowStructures`
option.
`arkNoPortDecrement="<bool>"`::
True if the `Port` option should be passed untouched.
False for the old behaviour of decrementing the `Port`.
Instance config files
~~~~~~~~~~~~~~~~~~~~~

View File

@ -1100,7 +1100,7 @@ doRun() {
# Port is actually one higher than specified
# i.e. specifying port 7777 will have the server
# use port 7778
if [ "$name" == "Port" ]; then
if [[ "$name" == "Port" && ( -z "$arkNoPortDecrement" || "$arkNoPortDecrement" == "false" ) ]]; then
(( val = val - 1 ))
fi

View File

@ -17,6 +17,7 @@ arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" # name of AR
arkbackupdir="/home/steam/ARK-Backups" # path to backup directory
arkwarnminutes="60" # number of minutes to warn players when using update --warn
arkprecisewarn="false" # set this to true to obey warnminutes even if no players are connected (recommended for clusters)
arkNoPortDecrement="true" # unset this to use the old Port - 1 behaviour
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