Displaying 1 result from an estimated 1 matches for "func_mail_hot".
2012 Jan 09
2
OT: simple server room temp monitor
...cron.
#!/bin/bash
# lm_sensors must be installed and configured first
# This will check the CPU temp and send email
# Changelog:
# 18 Feb 2009 - created
temp=$(/sbin/service lm_sensors status | /bin/grep CPU | /bin/cut -c 15-16)
/bin/echo $temp
#function to send mail with subject "Hot"
func_mail_hot () {
/bin/echo $temp | /bin/mail -s "server is hot" notification at arinet.org
}
#function to send mail with subject "Cool"
func_mail_cool () {
/bin/date >> /var/log/temp.log
/bin/echo $temp >> /var/log/temp.log
}
#testing the temperature of CPU
((temp>40)) &...