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