factorio/bin/entrypoint.sh

17 lines
335 B
Bash
Raw Normal View History

2017-04-30 21:58:44 +02:00
#!/bin/bash
set -e
BASE_DIR=/opt/factorio
RUN_DIR=${BASE_DIR}/headless/factorio
FACTORIO_BIN=${RUN_DIR}/bin/x64/factorio
WORLDNAME=${BASE_DIR}/saves/world.zip
2017-04-30 21:58:44 +02:00
# Create savefile, if none exists
2017-10-15 20:32:16 +02:00
[ ! -f ${WORLDNAME} ] && ${FACTORIO_BIN} --create ${WORLDNAME} "$@"
2017-04-30 21:58:44 +02:00
cd ${RUN_DIR}
2017-04-30 21:58:44 +02:00
exec ${FACTORIO_BIN} --start-server ${WORLDNAME} "$@"