factorio/bin/entrypoint.sh

17 lines
330 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
[ ! -f ${WORLDNAME} ] && ${FACTORIO_BIN} --create ${WORLDNAME}
cd ${RUN_DIR}
2017-04-30 21:58:44 +02:00
exec ${FACTORIO_BIN} --start-server ${WORLDNAME} "$@"