mirror of
https://github.com/luzifer-docker/factorio.git
synced 2024-11-08 06:40:02 +00:00
Initialize path config
This commit is contained in:
parent
3722dba10c
commit
14611dc2a4
3 changed files with 10 additions and 2 deletions
|
@ -14,8 +14,7 @@ RUN set -ex \
|
|||
&& useradd -d /opt/factorio -M -u 10000 factorio \
|
||||
&& tar -C /opt -x -z -f /tmp/factorio.tgz \
|
||||
&& chown -R factorio:factorio /opt/factorio \
|
||||
&& rm /tmp/factorio.tgz \
|
||||
&& sed -i "s;^write-data=.*$;write-data=/data;" /opt/factorio/config/config.ini
|
||||
&& rm /tmp/factorio.tgz
|
||||
|
||||
USER factorio
|
||||
|
||||
|
|
4
config.ini
Normal file
4
config.ini
Normal file
|
@ -0,0 +1,4 @@
|
|||
[path]
|
||||
read-data=__PATH__executable__/../../data
|
||||
write-data=/data
|
||||
|
5
start.sh
5
start.sh
|
@ -6,6 +6,11 @@ ACTION=$1
|
|||
BINARY="/opt/factorio/bin/x64/factorio"
|
||||
MAP_FILE="mapfile.zip"
|
||||
|
||||
if ! [ -e /opt/factorio/config/config.ini ]; then
|
||||
mkdir -p /opt/factorio/config
|
||||
cp /opt/defaults/config.ini /opt/factorio/config/config.ini
|
||||
fi
|
||||
|
||||
case ${ACTION} in
|
||||
"init")
|
||||
echo "Initializing files in case they do not exist: map-gen-settings.json / server-settings.json"
|
||||
|
|
Loading…
Reference in a new issue