Store logged data in spool directory
[usb-wde1-tools.git] / munin / usb-wde1_
index 485432b59325ac36a24e16388ca28bbe9b19d9da..3c75c72d43378cdca9baf144cbd76620cc7c6088 100755 (executable)
@@ -15,7 +15,7 @@ usb-wde1 -  Munin plugin to report usb-wde1 temperature and humidity data
 =head2 EXAMPLE CONFIGURATION
 
  [usb-wde1_*]
-  env.logfile /tmp/usb-wde1-last
+  env.logfile /var/spool/usb-wde1/usb-wde1-last
   env.host_name House
   env.sensors 0 1 7
   env.sensor0 Living room
@@ -46,7 +46,7 @@ http://www.gnu.org/licenses/agpl.html
 
 =cut
 
-. "$MUNIN_LIBDIR/plugins/plugin.sh"
+. ${MUNIN_LIBDIR:=/usr/share/munin}/plugins/plugin.sh
 
 TYPE=`basename $0 | sed 's/^.*_//g'`
 
@@ -82,7 +82,7 @@ done
 
 
 if [ "$1" = "config" ]; then
-    if [ "$host_name" != "" ]; then
+    if [ "x$host_name" != "x" ]; then
         echo "host_name $host_name"
     fi
     if [ "$TYPE" = "temperature" ]; then