Merge pull request #142 from yukienterprises/temp-save-removal

Remove temp (invalid) saves on container start
This commit is contained in:
David Andersen 2018-03-14 07:56:50 -07:00 committed by GitHub
commit 9a7f01f8bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 cp /opt/factorio/data/map-settings.example.json $CONFIG/map-settings.json
fi 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 if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then
/opt/factorio/bin/x64/factorio \ /opt/factorio/bin/x64/factorio \
--create $SAVES/_autosave1.zip \ --create $SAVES/_autosave1.zip \