#! /bin/sh # Send mail if which mail >/dev/null 2>&1 then echo "$SMARTD_FULLMESSAGE" | mail -s "$SMARTD_SUBJECT" "$SMARTD_ADDRESS" fi # Notify desktop user MESSAGE="SMART Disk monitor:" case "$SMARTD_FAILTYPE" in "EmailTest"|"Health"|"Temperature"|"Usage") ;; *) # "CurrentPendingSector", // 10 # "OfflineUncorrectableSector", // 11 # "FailedReadSmartErrorLog", // 7 # "ErrorCount", // 4 # "FailedReadSmartData", // 6 # "FailedHealthCheck", // 5 # "FailedOpenDevice", // 9 # "SelfTest", // 3 # "FailedReadSmartSelfTestLog", // 8 exit 0 esac echo "$MESSAGE $SMARTD_MESSAGE" | wall -n 2>/dev/null ||: