1
0
mirror of https://github.com/games-on-k8s/docker-factorio.git synced 2024-11-24 08:12:14 +02:00

Fixed rcon behavior

This commit is contained in:
Ilya Reva 2019-01-23 18:43:06 +02:00 committed by Greg Taylor
parent fd78684d0c
commit 675762f6d4

View File

@ -32,13 +32,11 @@ echo "###"
echo "# Game server port is '${FACTORIO_PORT}'"
echo "###"
if [ -z $FACTORIO_RCON_PORT ]
then
factorio_command="$factorio_command --rcon-port ${FACTORIO_RCON_PORT:-27015}"
echo "###"
echo "# RCON port is '${FACTORIO_RCON_PORT}'"
echo "###"
fi
FACTORIO_RCON_PORT=${FACTORIO_RCON_PORT:-27015}
factorio_command="$factorio_command --rcon-port ${FACTORIO_RCON_PORT}"
echo "###"
echo "# RCON port is '${FACTORIO_RCON_PORT}'"
echo "###"
if [ -z $FACTORIO_RCON_PASSWORD ]
then
@ -46,9 +44,13 @@ then
echo "###"
echo "# RCON password is '${FACTORIO_RCON_PASSWORD}'"
echo "###"
factorio_command="${factorio_command} --rcon-password ${FACTORIO_RCON_PASSWORD}"
fi
factorio_command="${factorio_command} --rcon-password ${FACTORIO_RCON_PASSWORD}"
echo "###"
echo "# RCON password is '${FACTORIO_RCON_PASSWORD}'"
echo "###"
# TODO Adding this because of bug, will need to be removed once bug in factorio is fixed
cd /opt/factorio/saves
# Handling save settings
@ -73,6 +75,7 @@ else
fi
echo "###"
echo "# Launching Game"
echo "# Entry Point ${factorio_command}"
echo "###"
# Closing stdin
exec 0<&-