D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
usr
/
share
/
doc
/
smartmontools
/
examplescripts
/
Filename :
Example8
back
Copy
#! /bin/sh # # This is a script from the smartmontools examplescripts/ directory. # It can be used as an argument to the -M exec Directive in # /etc/smartd.conf, in a line like # ... -m root@localhost -M exec /path/to/this/file # # See also: smartd.conf(5), smartd(8). # # $Id: Example8 4937 2019-08-04 15:29:43Z chrfranke $ # Skip if '-m <nomailer>' is set test -n "$SMARTD_ADDRESS" || exit 0 # Try mail[x] for mailer in \ $(which mail 2>/dev/null) \ $(which mailx 2>/dev/null) \ /usr/bin/mail \ /usr/bin/mailx do test -f "$mailer" || continue test -x "$mailer" || continue exec "$mailer" -s "${SMARTD_SUBJECT-[SMARTD_SUBJECT]}" $SMARTD_ADDRESS <<EOF ${SMARTD_FULLMESSAGE-[SMARTD_FULLMESSAGE]} EOF exit $? done # Try sendmail for sendmail in \ /usr/sbin/sendmail \ /usr/lib/sendmail do test -f "$sendmail" || continue test -x "$sendmail" || continue exec "$sendmail" $SMARTD_ADDRESS <<EOF Subject: ${SMARTD_SUBJECT-[SMARTD_SUBJECT]} To: $(echo $SMARTD_ADDRESS | sed 's/ /, /g') ${SMARTD_FULLMESSAGE-[SMARTD_FULLMESSAGE]} EOF exit $? done echo "$0: found none of 'mail', 'mailx' or 'sendmail'" exit 1
Name
Size
Last Modified
Owner
Permissions
Actions
Example1
1.505
KB
July 18 2014 7:13:32
root
0644
Example2
0.691
KB
July 18 2014 7:13:32
root
0644
Example3
0.675
KB
July 18 2014 7:13:32
root
0644
Example4
0.252
KB
August 17 2013 9:22:53
root
0644
Example5
0.162
KB
August 17 2013 9:22:53
root
0644
Example6
0.89
KB
June 28 2019 8:12:33
root
0644
Example7
0.563
KB
June 28 2019 8:01:56
root
0644
Example8
1.107
KB
August 04 2019 3:29:43
root
0644
README
2.118
KB
August 04 2019 3:29:43
root
0644
2017 © D7net | D704T team