Skip to content

Commit c5f5f77

Browse files
author
Christophe Vandekerchove
committed
Added new env variable FACTORIO_WAITING
This is for a new feature that is being prepared :)
1 parent 1867666 commit c5f5f77

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ ENV FACTORIO_AUTOSAVE_INTERVAL=2 \
1515
FACTORIO_NO_AUTO_PAUSE=false \
1616
FACTORIO_LATENCY_MS=100 \
1717
VERSION=0.12.35 \
18-
FACTORIO_SHA1=ea15636469148662c26786ad916ac066ee5aab56
18+
FACTORIO_SHA1=ea15636469148662c26786ad916ac066ee5aab56 \
19+
FACTORIO_WAITING=false
1920

2021
RUN apk --update add bash curl && \
2122
curl -sSL --cacert /opt/factorio.crt https://www.factorio.com/get-download/$VERSION/headless/linux64 -o /tmp/factorio_headless_x64_$VERSION.tar.gz && \

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ docker run -d \
105105
zopanix/factorio
106106
107107
```
108+
109+
#### Waiting for ready
110+
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.
111+
112+
More to come
108113
If some can explain it, please make a PR :-)
109114
### ToDo's
110115
* Add cutom savename for people with a lot of saves

smart_launch.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#!/bin/bash
2-
2+
# Checking if server is ready
3+
if [ $FACTORIO_WAITING == true ]
4+
then
5+
until [ -f /opt/factorio/saves/ready ]
6+
do
7+
echo "# Waiting for backup daemon to be ready"
8+
sleep 1
9+
done
10+
fi
311
if [ -f /opt/factorio/saves/save.zip ]
412
then
513
echo "###"

0 commit comments

Comments
 (0)