mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-02-03 12:34:44 +01:00
simplify startup
This commit is contained in:
parent
3a007b377f
commit
f3df464856
@ -2,14 +2,9 @@
|
|||||||
|
|
||||||
SAVES=/opt/factorio/saves
|
SAVES=/opt/factorio/saves
|
||||||
|
|
||||||
if [ -f $SAVES/*.zip ]
|
if [ ! -f $SAVES/*.zip ]
|
||||||
then
|
then
|
||||||
last_save=$(ls $SAVES -lt | grep save |head -1 |awk '{print $(NF)}')
|
/opt/factorio/bin/x64/factorio --create $SAVES/save.zip
|
||||||
else
|
|
||||||
last_save="save.zip"
|
|
||||||
/opt/factorio/bin/x64/factorio --create $SAVES/$last_save
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec /opt/factorio/bin/x64/factorio \
|
exec /opt/factorio/bin/x64/factorio --start-server-load-latest
|
||||||
--start-server \
|
|
||||||
$SAVES/$last_save
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user