search for: func_mail_cool

Displaying 1 result from an estimated 1 matches for "func_mail_cool".

2012 Jan 09
2
OT: simple server room temp monitor
...=$(/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)) && func_mail_hot || func_mail_cool Thank you -- Fajar.