mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-01-27 01:34:44 +01:00
Update docker-entrypoint.sh (#253)
This commit is contained in:
parent
010b96e0b0
commit
b0cedbbe1b
@ -29,7 +29,8 @@ 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
|
NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l )
|
||||||
|
if [ $NRTMPSAVES -gt 0 ]; then
|
||||||
# Delete incomplete saves (such as after a forced exit)
|
# Delete incomplete saves (such as after a forced exit)
|
||||||
rm -f "$SAVES/*.tmp.zip"
|
rm -f "$SAVES/*.tmp.zip"
|
||||||
fi
|
fi
|
||||||
@ -46,7 +47,8 @@ else
|
|||||||
SU_EXEC=""
|
SU_EXEC=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! find -L "$SAVES" -iname \*.zip -mindepth 1 -print | grep -q .; then
|
NRSAVES=$( find -L "$SAVES" -iname \*.zip -mindepth 1 | wc -l )
|
||||||
|
if [ $NRSAVES -eq 0 ]; then
|
||||||
# Generate a new map if no save ZIPs exist
|
# Generate a new map if no save ZIPs exist
|
||||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
||||||
--create "$SAVES/_autosave1.zip" \
|
--create "$SAVES/_autosave1.zip" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user