mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-01-12 11:17:10 +01:00
Added feature to take latest save
This commit is contained in:
parent
2d9d8e17b8
commit
2bd0d475eb
@ -9,7 +9,7 @@ Current Version
|
|||||||
#### Factorio
|
#### Factorio
|
||||||
[factorio's site](http://www.factorio.com)
|
[factorio's site](http://www.factorio.com)
|
||||||
#### Docker image
|
#### Docker image
|
||||||
|
Automatically takes latest save or autosave. when restarting the container.
|
||||||
Versions
|
Versions
|
||||||
-----
|
-----
|
||||||
I'm keeping the image up to date. If you need to use an older version, checkout out the different tags.
|
I'm keeping the image up to date. If you need to use an older version, checkout out the different tags.
|
||||||
|
@ -5,6 +5,10 @@ then
|
|||||||
echo "###"
|
echo "###"
|
||||||
echo "# Using existing map [save.zip]"
|
echo "# Using existing map [save.zip]"
|
||||||
echo "###"
|
echo "###"
|
||||||
|
echo "###"
|
||||||
|
echo "# Finding latest map"
|
||||||
|
echo "###"
|
||||||
|
$last_save=ls /opt/factorio/saves -lt | grep save |head -1 |awk '{print $(NF)}'
|
||||||
else
|
else
|
||||||
echo "###"
|
echo "###"
|
||||||
echo "# Creating a new map [save.zip]"
|
echo "# Creating a new map [save.zip]"
|
||||||
@ -18,4 +22,4 @@ fi
|
|||||||
echo "###"
|
echo "###"
|
||||||
echo "# Launching Game"
|
echo "# Launching Game"
|
||||||
echo "###"
|
echo "###"
|
||||||
exec /opt/factorio/bin/x64/factorio --disallow-commands --start-server save.zip
|
exec /opt/factorio/bin/x64/factorio --disallow-commands --start-server $last_save
|
||||||
|
Loading…
Reference in New Issue
Block a user