bugfixes in sqlite3 processor
authorBrian Flowers <git-admn@bsflowers.net>
Tue, 20 Sep 2016 07:04:13 +0000 (03:04 -0400)
committerBrian Flowers <git-admn@bsflowers.net>
Tue, 20 Sep 2016 07:04:13 +0000 (03:04 -0400)
bdsm.d/sqlite3.processor

index 53fb8e1..076b0f4 100644 (file)
@@ -41,7 +41,7 @@ help()
 
 start()
 {
-  sqlite3 /home/bdsm/bdsm.sqlite3 "SELECT 1 FROM MEASUREMENTS"
+  sqlite3 /home/bdsm/bdsm.sqlite3 "SELECT 1 FROM MEASUREMENTS" 2>/dev/null 1>&2
   if [ $? -eq 1 ]; then
     sqlite3 /home/bdsm/bdsm.sqlite3 \
         "CREATE TABLE MEASUREMENTS(\
@@ -55,7 +55,7 @@ start()
   cat /home/bdsm/in.fifo | awk -F'|' '{ \
     printf("INSERT INTO MEASUREMENTS(timestamp,host,attribute,value) \
       VALUES (%s,\"%s\", \"%s\", \"%s\");\n",$1,$2, $3, $4) }' | \
-  sqlite3 bdsm.sqlite3 
+  sqlite3 bdsm.sqlite3 &
   echo $! > /home/bdsm/.processor.pid
 }