Updated documentation.

This commit is contained in:
Markus Makela 2015-06-18 18:13:50 +03:00
parent f6369a1661
commit 0cc2c13d7e

View File

@ -124,9 +124,11 @@ Here is an example shell script which sends an email to an admin when a server g
#!/usr/bin/env bash
#This script assumes that the local mail server is configured properly
#The second argument is the event type
event=${$2/.*=/}
server=${$3/.*=/}
message="A server has gone down at `date`."
echo $message|mail -s "A server has gone down" admin@my.org
echo $message|mail -s "The event was $event for server $server." admin@my.org
```