terraria/start.sh

19 lines
496 B
Bash
Raw Normal View History

#!/usr/local/bin/dumb-init /bin/bash
set -euxo pipefail
2015-11-22 12:34:49 +00:00
if ! [ -e /data/config.ini ]; then
cp ${SERVER}/config.ini.default /data/config.ini
2015-11-22 12:34:49 +00:00
fi
SERVER_BINARY=$(find /home/gameserver -name 'TerrariaServer.bin.x86_64')
2016-06-23 09:02:43 +00:00
# FIX: The ZIP archive does not have correct permissions
chmod +x "${SERVER_BINARY}"
2016-06-23 09:02:43 +00:00
# Force data path to be writable
chown -R gameserver:gameserver /data
exec terraria-docker_linux_amd64 | /usr/local/bin/gosu \
gameserver \
${SERVER_BINARY} -config /data/config.ini "$@"