diff --git a/Dockerfile b/Dockerfile index df2dcce..aac9d93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,8 @@ RUN apk add --no-cache --virtual .build-deps \ && rm -rf /usr/local/source \ && chmod 755 /usr/local/sbin/recorder-health.sh \ && apk del .build-deps +RUN apk add --no-cache \ + curl jq VOLUME ["/store", "/config"] diff --git a/recorder-health.sh b/recorder-health.sh index 745dab3..02e65ef 100644 --- a/recorder-health.sh +++ b/recorder-health.sh @@ -21,7 +21,7 @@ curl -sSL --data "${location}" "http://${addr}:${port}/pub?u=ping&d=ping" > /dev # obtain tst of ping/ping's last location ret_epoch=$(curl -sSL http://${addr}:${port}/api/0/last --data "user=ping&device=ping" | - env python -c 'import sys, json; print json.load(sys.stdin)[0]["tst"];') + env jq -r '.[0].tst' ) if [ $epoch -ne $ret_epoch ]; then echo PANIC $epoch $ret_epoch