Skip to content

Commit

Permalink
Added new env variable FACTORIO_WAITING
Browse files Browse the repository at this point in the history
This is for a new feature that is being prepared :)
  • Loading branch information
Christophe Vandekerchove committed Jun 8, 2016
1 parent 1867666 commit c5f5f77
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ ENV FACTORIO_AUTOSAVE_INTERVAL=2 \
FACTORIO_NO_AUTO_PAUSE=false \
FACTORIO_LATENCY_MS=100 \
VERSION=0.12.35 \
FACTORIO_SHA1=ea15636469148662c26786ad916ac066ee5aab56
FACTORIO_SHA1=ea15636469148662c26786ad916ac066ee5aab56 \
FACTORIO_WAITING=false

RUN apk --update add bash curl && \
curl -sSL --cacert /opt/factorio.crt https://www.factorio.com/get-download/$VERSION/headless/linux64 -o /tmp/factorio_headless_x64_$VERSION.tar.gz && \
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ docker run -d \
zopanix/factorio
```

#### Waiting for ready
This is a beta feature which has nothing to do with factorio... leave it as it is for the moment. I'm working with some collegues on something new which should work very well and please a lot of people.

More to come
If some can explain it, please make a PR :-)
### ToDo's
* Add cutom savename for people with a lot of saves
10 changes: 9 additions & 1 deletion smart_launch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash

# Checking if server is ready
if [ $FACTORIO_WAITING == true ]
then
until [ -f /opt/factorio/saves/ready ]
do
echo "# Waiting for backup daemon to be ready"
sleep 1
done
fi
if [ -f /opt/factorio/saves/save.zip ]
then
echo "###"
Expand Down

0 comments on commit c5f5f77

Please sign in to comment.