1
0
mirror of https://github.com/bplein/factorio-docker.git synced 2024-11-24 08:42:31 +02:00

Remove temp (invalid) saves on container start

This commit is contained in:
Yuki Hyou 2018-03-13 16:19:24 +11:00
parent 843bcbff21
commit 877219f9c9

View File

@ -28,6 +28,10 @@ if [ ! -f $CONFIG/map-settings.json ]; then
cp /opt/factorio/data/map-settings.example.json $CONFIG/map-settings.json
fi
if find -L $SAVES -iname \*.tmp.zip -mindepth 1 -print | grep -q .; then
rm -f $SAVES/*.tmp.zip
fi
if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then
/opt/factorio/bin/x64/factorio \
--create $SAVES/_autosave1.zip \