#!/usr/bin/env bash # Monitor temperatures in OSX # Depends on the installation of TemperatureMonitor from www.bresink.com/osx/TemperatureMonitor.html # Nagios Exit Codes OK=0 WARNING=1 CRITICAL=2 UNKNOWN=3 usage() { cat < crit { high=1; print $0 } END { if (high == 1) { exit 2 } else { exit 0 } }' if [ $? -eq 2 ]; then exit $CRITICAL else echo "No high temperatures" exit $OK fi fi