mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-26 02:48:28 +00:00
path to clewarecontrol can be specified.
This commit is contained in:
parent
b9dfa6b0a4
commit
e72c363bc6
1 changed files with 16 additions and 7 deletions
|
@ -1,12 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# written by lars falk-petersen, dev@falk-petersen.no
|
# Written by Lars Falk-Petersen, cleware@falk-petersen.no
|
||||||
# clewarecontrol device serial must be set in config file:
|
# Version 0.2. To be used with http://www.vanheusden.com/clewarecontrol/
|
||||||
#
|
# Clewarecontrol device serial must be set in config file:
|
||||||
# #munin/plugin-conf.d/cleware
|
|
||||||
|
# #Put the following lines in /etc/munin/plugin-conf.d/cleware
|
||||||
# [cleware]
|
# [cleware]
|
||||||
# #device serial. find it by running: clewarecontrol -l
|
# #device serial. find it by running: clewarecontrol -l
|
||||||
# env.serial 7778
|
# env.serial 7778
|
||||||
|
# #path of clewarecontrol
|
||||||
|
# env.bin /usr/bin/clewarecontrol
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
config)
|
config)
|
||||||
|
@ -23,11 +26,17 @@ EOM
|
||||||
exit 0;;
|
exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
clewarecontrol -ag > /dev/null 2>&1
|
[ ! $bin ] && bin="clewarecontrol"
|
||||||
|
if [ ! $serial ]; then
|
||||||
|
echo "Serial not set! Hint: Read the top of this script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$bin -ag > /dev/null 2>&1
|
||||||
|
|
||||||
echo -n "temp.value "
|
echo -n "temp.value "
|
||||||
clewarecontrol -d $serial -b -rt
|
$bin -d $serial -b -rt
|
||||||
|
|
||||||
echo -n "hum.value "
|
echo -n "hum.value "
|
||||||
clewarecontrol -d $serial -b -rh
|
$bin -d $serial -b -rh
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue