]>
git.proxmox.com Git - mirror_smartmontools-debian.git/blob - examplescripts/Example6
4 if which mail >/dev
/null
2>&1
6 echo "$SMARTD_MESSAGE" |
mail -s "$SMARTD_FAILTYPE" "$SMARTD_ADDRESS"
10 MESSAGE
="SMART Disk monitor:"
11 case "$SMARTD_FAILTYPE" in
12 "EmailTest"|
"Health"|
"Temperature"|
"Usage")
15 # "CurrentPendingSector", // 10
16 # "OfflineUncorrectableSector", // 11
17 # "FailedReadSmartErrorLog", // 7
19 # "FailedReadSmartData", // 6
20 # "FailedHealthCheck", // 5
21 # "FailedOpenDevice", // 9
23 # "FailedReadSmartSelfTestLog", // 8
27 # direct write to terminals, do not use 'wall', because we don't want its ugly header
28 for t
in $
(who |
awk '{ print $2; }' |
grep -e '^tty' -e '^pts/')
31 $SMARTD_MESSAGE" >/dev
/$t 2>/dev
/null ||
: