Update container to stretch and use factorio user instead of root

This commit is contained in:
madmaurice 2017-09-05 00:07:33 +02:00 committed by Hive
parent 78b99a6ba3
commit 16a4872ea3
3 changed files with 25 additions and 10 deletions

View file

@ -1,10 +1,16 @@
#!/bin/bash
set -e
FACTORIO_BIN=/root/factorio/bin/x64/factorio
WORLDNAME=/root/saves/world.zip
BASE_DIR=/opt/factorio
RUN_DIR=${BASE_DIR}/headless/factorio
FACTORIO_BIN=${RUN_DIR}/bin/x64/factorio
WORLDNAME=${BASE_DIR}/saves/world.zip
# Create savefile, if none exists
[ ! -f ${WORLDNAME} ] && ${FACTORIO_BIN} --create ${WORLDNAME}
cd ${RUN_DIR}
exec ${FACTORIO_BIN} --start-server ${WORLDNAME} "$@"