diff options
| -rwxr-xr-x | munin/usb-wde1.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/munin/usb-wde1.sh b/munin/usb-wde1.sh new file mode 100755 index 0000000..7052112 --- /dev/null +++ b/munin/usb-wde1.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# -*- sh -*- + +: << =cut + +=head1 NAME + +usb-wde1 - Munin plugin to report usb-wde1 temperature and humidity data + +=head1 CONFIGURATION + +=head2 EXAMPLE CONFIGURATION + + [usb-wde1] + env.logfile /var/log/usb-wde1.log + env.sensor0 Living room + env.sensor1 Kitchen + +=head1 MAGIC MARKERS + + #%# family=manual + #%# capabilities=autoconf suggest + +=cut + +# suggest, config +# params: +# - logfile +# - sensor names +# - type (temperature / humidity + +if [ "$1" = "autoconf" ]; then + if [ -r "$logfile" ]; then + echo yes + else + echo "no (Logfile \"$logfile\" does not exist)" + fi + exit 0 +fi + +if [ "$1" = "suggest" ]; then + echo temperature + echo humidity + exit 0 +fi |
