From e501a9d47e3818bee24c61885a6fa1020092a72d Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Tue, 30 May 2017 17:57:31 +0200 Subject: [PATCH] read settings from environment --- toLineProtocol.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toLineProtocol.sh b/toLineProtocol.sh index 850aab8..23f5090 100755 --- a/toLineProtocol.sh +++ b/toLineProtocol.sh @@ -35,14 +35,13 @@ # TODO: # - check if CSV export is in UTC ? -SRC_FILE="${1:-/dev/stdin}" +SRC_FILE=${1:-/dev/stdin} -DATABASE=feinstaub -SENSOR_ID=16229960 +DATABASE=${INFLUX_DATABASE:-feinstaub} +SENSOR_ID=${SENSOR_ID:-16229960} NODE=esp8266-$SENSOR_ID - STRIP_CSV_HEADERS="tail -n +2" cat $SRC_FILE \