From 9b0b73eac58690f0c740cf93e8b275d92ac75ce1 Mon Sep 17 00:00:00 2001 From: Nils Jakobi Date: Mon, 4 Nov 2019 22:56:00 +0100 Subject: [PATCH] forgot sed, curl and folders... --- Dockerfile | 5 ++++- nodePoller.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dcb1e62..3b904a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,9 @@ LABEL maintainer "Stefan Hoffmann, Nils Jakobi" VOLUME [ "/opt/data" ] +# prerequisists +RUN apk add curl sed + # Configure cron COPY crontab /etc/cron/crontab @@ -13,4 +16,4 @@ COPY nodePoller.sh . # Init cron RUN crontab /etc/cron/crontab -CMD ["crond", "-f"] +ENTRYPOINT ["crond", "-f"] diff --git a/nodePoller.sh b/nodePoller.sh index cfac272..2367826 100755 --- a/nodePoller.sh +++ b/nodePoller.sh @@ -4,6 +4,7 @@ for i in 4 5 6 7 do for f in meshviewer #graph nodelist nodes do + mkdir -p /opt/data/tdf$i/ 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