12 sensors
="/usr/bin/sensors"
15 while [ $# -gt 0 ] ; do
17 -c ) cmd
="${2}" ; shift 2 ;;
18 -m ) addr
="${2}" ; shift 2 ;;
19 -s ) slp
="${2}" ; shift 2 ;;
24 case "${ALARM_RESET}" in
25 yes) /usr
/bin
/sensors
> /dev
/null
31 [ -n "${cmd}" ] && [ -n "$( which -- "${cmd%% *}" )" ] || \
32 [ -n "${addr}" ] ||
exit 1
34 [ "${slp}" -ge 2 ] || slp
=600
38 message
="$( $sensors )"
40 '' ) message
='Could not get any sensor values !' ;;
44 if [ -n "$message" ]; then
45 if [ -n "${addr}" ]; then
46 echo "$message" |
mail -s \
47 "Sensors ALARM detected at host: $( hostname )" \
50 [ -z "${cmd}" ] ||
${cmd} &