diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2022-04-06 11:54:21 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2022-04-06 11:54:21 +0200 |
commit | 736ffc77f09a8e238e63a9819d19fe41e7c523d4 (patch) | |
tree | c4c3d4e36865c0ef63f33af71a2edf2857e0312b /roles/factorio/files/run.sh | |
parent | e835ea003eb91a534bfcead68062562e6ed1e665 (diff) | |
download | ansible_collection-736ffc77f09a8e238e63a9819d19fe41e7c523d4.tar.gz |
factorio
Diffstat (limited to 'roles/factorio/files/run.sh')
-rw-r--r-- | roles/factorio/files/run.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/factorio/files/run.sh b/roles/factorio/files/run.sh new file mode 100644 index 0000000..d5eeacc --- /dev/null +++ b/roles/factorio/files/run.sh @@ -0,0 +1,14 @@ +#!/bin/bash +trap '' TERM + +source cfg.sh || exit 1 + +mkdir -p ./saves + +if [ ! -f "./saves/$SAVEFILE.zip" ]; then + factorio/bin/x64/factorio --create "./saves/$SAVEFILE.zip" \ + --map-gen-settings ./mapgen-config.json \ + --map-settings ./map-config.json || exit 1 +fi + +factorio/bin/x64/factorio --start-server "./saves/$SAVEFILE.zip" --server-settings server-config.json |