From 43e8530e93493bb978c446a2023134bdd4277e50 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 19:14:45 +0200 Subject: Adding upstream version 7.4. Signed-off-by: Daniel Baumann --- examplescripts/Example7 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 examplescripts/Example7 (limited to 'examplescripts/Example7') diff --git a/examplescripts/Example7 b/examplescripts/Example7 new file mode 100755 index 0000000..7766b4b --- /dev/null +++ b/examplescripts/Example7 @@ -0,0 +1,26 @@ +#! /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: Example7 5442 2023-01-26 18:15:26Z chrfranke $ + +if [ $# -lt 3 ] || [ "$1" != "-s" ]; then + echo "Usage: $0 -s SUBJECT ADDRESS... < MESSAGE" + exit 1 +fi + +SUBJECT=$2 +shift; shift +ADDRESS=$* + +exec /usr/sbin/sendmail $ADDRESS <