summaryrefslogtreecommitdiff
path: root/staging/lm_sensors/healthd
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-06-14 18:16:51 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2012-06-14 18:16:51 +0200
commitb32e36625b44b5c002c417ab4faf6311258c7671 (patch)
tree87f91f6f7d9ccb229f9c7613f5411534bd504f5e /staging/lm_sensors/healthd
parent1a274201c465801ed2271018f426f0eaf7098215 (diff)
parent35c30674b2b901077a809a6f1d8e5a0115098c8b (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community-staging/mplayer2/PKGBUILD community/pcmanfm/PKGBUILD extra/liblrdf/PKGBUILD extra/php-apc/PKGBUILD extra/sqlite/PKGBUILD kde-unstable/libkgapi/PKGBUILD kde-unstable/soprano/PKGBUILD multilib/lib32-libphobos-ldc/PKGBUILD multilib/lib32-pixman/PKGBUILD multilib/lib32-sqlite3/PKGBUILD
Diffstat (limited to 'staging/lm_sensors/healthd')
-rw-r--r--staging/lm_sensors/healthd46
1 files changed, 0 insertions, 46 deletions
diff --git a/staging/lm_sensors/healthd b/staging/lm_sensors/healthd
deleted file mode 100644
index 0315dd788..000000000
--- a/staging/lm_sensors/healthd
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-#
-# /usr/sbin/healthd
-#
-
-. /etc/conf.d/healthd
-
-cmd="${ALARM_CMD}"
-addr="${ADMIN_EMAIL}"
-slp="${ALARM_SLEEP}"
-sensors="/usr/bin/sensors"
-
-
-while [ $# -gt 0 ] ; do
- case "${1}" in
- -c ) cmd="${2}" ; shift 2 ;;
- -m ) addr="${2}" ; shift 2 ;;
- -s ) slp="${2}" ; shift 2 ;;
- * ) shift 1 ;;
- esac
-done
-
-[ -n "${cmd}" ] && [ -n "$( which -- "${cmd%% *}" )" ] || \
- [ -n "${addr}" ] || exit 1
-
-[ "${slp}" -ge 2 ] || slp=600
-
-while true ; do
- sleep 15
- message="$( $sensors )"
- case "$message" in
- '' ) message='Could not get any sensor values !' ;;
- *ALARM* ) : ;;
- * ) message='' ;;
- esac
- if [ -n "$message" ]; then
- if [ -n "${addr}" ]; then
- echo "$message" | mail -s \
- "Sensors ALARM detected at host: $( hostname )" \
- "${addr}"
- fi
- [ -z "${cmd}" ] || ${cmd} &
- sleep ${slp}
- fi
-done &