Updated documentation.
This commit is contained in:
parent
f6369a1661
commit
0cc2c13d7e
@ -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
|
||||
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user