From 84b33f3efbe4678ddf2acb54aee0aeaaa43240d9 Mon Sep 17 00:00:00 2001 From: Ebus-at-dockstar Date: Thu, 18 Sep 2014 00:01:49 +0200 Subject: update one datasource --- datasources/yves_laserjet_tonerstatus.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'datasources') diff --git a/datasources/yves_laserjet_tonerstatus.sh b/datasources/yves_laserjet_tonerstatus.sh index 6b7628a..a57253a 100755 --- a/datasources/yves_laserjet_tonerstatus.sh +++ b/datasources/yves_laserjet_tonerstatus.sh @@ -1,14 +1,11 @@ #!/bin/sh +. "`dirname \"$0\"`"/datastore-functions.sh name=yves.laserjet.tonerstatus -type=int curl -s "http://10.1.0.10/hp/device/info_suppliesStatus.html" | sed -ne 's/.*>\([0-9]*\)%<.*/\1/p' | ( read value - curl -s -i -H "Accept: application/json" \ - -X PUT "http://localhost:8000/sensor/${name}" \ - -d "value=${value}&type=${type}" | - grep '"error": null' >/dev/null + put_value_sensor_now "$name" "$value" ) -- cgit v1.2.1