From 9338cf4ef32efa6e292f589cc642835aeca9e7a8 Mon Sep 17 00:00:00 2001 From: Robert Thomas <31854736+wolveix@users.noreply.github.com> Date: Sun, 17 Sep 2023 17:08:36 +0100 Subject: [PATCH] Support IPv6-only clients (#202) --- Dockerfile | 2 +- run.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8fa843d..53b0a5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ ENV AUTOPAUSE="true" \ PUID="1000" \ SERVERBEACONPORT="15000" \ SERVERGAMEPORT="7777" \ - SERVERIP="0.0.0.0" \ + SERVERIP="" \ SERVERQUERYPORT="15777" \ SKIPUPDATE="false" \ STEAMAPPID="1690800" \ diff --git a/run.sh b/run.sh index c093b6f..7409bba 100755 --- a/run.sh +++ b/run.sh @@ -93,6 +93,10 @@ printf "Setting autosave on disconnect to %s\\n" "${AUTOSAVEONDISCONNECT^}" set_ini_prop "ServerSettings.ini" "\/Script\/FactoryGame\.FGServerSubsystem" "mAutoSaveOnDisconnect" "${AUTOSAVEONDISCONNECT^}" ## END ServerSettings.ini +if [ -n "$SERVERIP" ]; then + SERVERIP="-multihome \"$SERVERIP\"" +fi + if ! [[ "${SKIPUPDATE,,}" == "true" ]]; then if [[ "${STEAMBETA,,}" == "true" ]]; then printf "Experimental flag is set. Experimental will be downloaded instead of Early Access.\\n" @@ -152,4 +156,4 @@ fi cd /config/gamefiles || exit 1 -exec ./FactoryServer.sh -log -NoSteamClient -unattended ?listen -Port="$SERVERGAMEPORT" -BeaconPort="$SERVERBEACONPORT" -ServerQueryPort="$SERVERQUERYPORT" -multihome="$SERVERIP" "$@" +exec ./FactoryServer.sh -log -NoSteamClient -unattended ?listen -Port="$SERVERGAMEPORT" -BeaconPort="$SERVERBEACONPORT" -ServerQueryPort="$SERVERQUERYPORT" $SERVERIP "$@" \ No newline at end of file