mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-07-07 09:44:44 +02:00
Added dynamic creation of map only if needed
This commit is contained in:
21
smart_launch.sh
Executable file
21
smart_launch.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f /opt/factorio/saves/save.zip ]
|
||||
then
|
||||
echo "###"
|
||||
echo "# Using existing map [save.zip]"
|
||||
echo "###"
|
||||
else
|
||||
echo "###"
|
||||
echo "# Creating a new map [save.zip]"
|
||||
echo "###"
|
||||
opt/factorio/bin/x64/factorio --create save.zip
|
||||
echo "###"
|
||||
echo "# New map created [save.zip]"
|
||||
echo "###"
|
||||
fi
|
||||
|
||||
echo "###"
|
||||
echo "# Launching Game"
|
||||
echo "###"
|
||||
exec /opt/factorio/bin/x64/factorio --disallow-commands --start-server save.zip
|
Reference in New Issue
Block a user