Sergiusz Bazanski | 6586533 | 2019-05-18 16:23:45 +0200 | [diff] [blame] | 1 | #!/bin/bash |
2 | |||||
3 | echo "entrypoint.sh starting..." | ||||
4 | |||||
5 | if [ ! -d /data ]; then | ||||
6 | echo "/data is not mounted, exiting." | ||||
7 | exit 1 | ||||
8 | fi | ||||
9 | |||||
10 | cd /data | ||||
11 | |||||
12 | if [ ! -f /data/game.zip ]; then | ||||
13 | echo "No save game, creating new..." | ||||
14 | /factorio/bin/x64/factorio --create game | ||||
15 | fi | ||||
16 | |||||
17 | echo "Running with args: $@" | ||||
18 | exec /factorio/bin/x64/factorio --start-server game "$@" |