7052112e292c870ea91d3a86e3591b9a993dda9b
[usb-wde1-tools.git] / munin / usb-wde1.sh
1 #!/bin/sh
2 # -*- sh -*-
3
4 : << =cut
5
6 =head1 NAME
7
8 usb-wde1 -  Munin plugin to report usb-wde1 temperature and humidity data
9
10 =head1 CONFIGURATION
11
12 =head2 EXAMPLE CONFIGURATION
13
14  [usb-wde1]
15   env.logfile /var/log/usb-wde1.log
16   env.sensor0 Living room
17   env.sensor1 Kitchen
18
19 =head1 MAGIC MARKERS
20
21  #%# family=manual
22  #%# capabilities=autoconf suggest
23
24 =cut
25
26 # suggest, config
27 # params:
28 # - logfile
29 # - sensor names
30 # - type (temperature / humidity
31
32 if [ "$1" = "autoconf" ]; then
33     if [ -r "$logfile" ]; then
34         echo yes
35     else
36         echo "no (Logfile \"$logfile\" does not exist)"
37     fi
38     exit 0
39 fi
40
41 if [ "$1" = "suggest" ]; then
42     echo temperature
43     echo humidity
44     exit 0
45 fi