first draft of enhanced version
This commit is contained in:
parent
5358d1e705
commit
4313edc993
@ -1,9 +1,13 @@
|
|||||||
FROM alpine:3.7
|
FROM alpine:3.10.3
|
||||||
LABEL maintainer "Stefan Hoffmann>"
|
LABEL maintainer "Stefan Hoffmann, Nils Jakobi"
|
||||||
|
|
||||||
# Configure cron
|
# Configure cron
|
||||||
COPY crontab /etc/cron/crontab
|
COPY crontab /etc/cron/crontab
|
||||||
|
|
||||||
|
# Copy script
|
||||||
|
WORKDIR /opt/fftdf/
|
||||||
|
COPY nodePoller.sh .
|
||||||
|
|
||||||
# Init cron
|
# Init cron
|
||||||
RUN crontab /etc/cron/crontab
|
RUN crontab /etc/cron/crontab
|
||||||
|
|
||||||
|
17
crontab
17
crontab
@ -1,16 +1 @@
|
|||||||
* * * * * wget http://4.fftdf.de/graph.json -O /opt/data/tdf4/graph.json
|
* * * * * /opt/fftdf/nodePoller.sh
|
||||||
* * * * * wget http://4.fftdf.de/meshviewer.json -O /opt/data/tdf4/meshviewer.json
|
|
||||||
* * * * * wget http://4.fftdf.de/nodelist.json -O /opt/data/tdf4/nodelist.json
|
|
||||||
* * * * * wget http://4.fftdf.de/nodes.json -O /opt/data/tdf4/nodes.json
|
|
||||||
* * * * * wget http://5.fftdf.de/graph.json -O /opt/data/tdf5/graph.json
|
|
||||||
* * * * * wget http://5.fftdf.de/meshviewer.json -O /opt/data/tdf5/meshviewer.json
|
|
||||||
* * * * * wget http://5.fftdf.de/nodelist.json -O /opt/data/tdf5/nodelist.json
|
|
||||||
* * * * * wget http://5.fftdf.de/nodes.json -O /opt/data/tdf5/nodes.json
|
|
||||||
* * * * * wget http://6.fftdf.de/graph.json -O /opt/data/tdf6/graph.json
|
|
||||||
* * * * * wget http://6.fftdf.de/meshviewer.json -O /opt/data/tdf6/meshviewer.json
|
|
||||||
* * * * * wget http://6.fftdf.de/nodelist.json -O /opt/data/tdf6/nodelist.json
|
|
||||||
* * * * * wget http://6.fftdf.de/nodes.json -O /opt/data/tdf6/nodes.json
|
|
||||||
* * * * * wget http://7.fftdf.de:8080/graph.json -O /opt/data/tdf7/graph.json
|
|
||||||
* * * * * wget http://7.fftdf.de:8080/meshviewer.json -O /opt/data/tdf7/meshviewer.json
|
|
||||||
* * * * * wget http://7.fftdf.de:8080/nodelist.json -O /opt/data/tdf7/nodelist.json
|
|
||||||
* * * * * wget http://7.fftdf.de:8080/nodes.json -O /opt/data/tdf7/nodes.json
|
|
9
nodePoller.sh
Executable file
9
nodePoller.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for i in 4 5 6 7
|
||||||
|
do
|
||||||
|
for f in meshviewer #graph nodelist nodes
|
||||||
|
do
|
||||||
|
curl http://$i.fftdf.de/$f.json -o /opt/data/tdf$i/$f.json || sed -i -e 's/"is_online":true/"is_online":false/g' /opt/data/tdf$i/$f.json
|
||||||
|
done
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user