I wanted to be able to notify a group of people when any backup starts or ends, so I did some googling and found an archived email on this list about how I might do it.
I made a script with the following contents as a test and named it startbkpemail.sh (just used the example name from the post) and added the a line '/usr/local/bin/startbkpemail.sh $host $type'; in the DumpPreUserCmd field in the host config - but it is not executing it. Any suggestions? The permissions on the file are 777 for testing so I know that is not the problem.
echo "Server Name: $1" >> $MESSAGE echo "Backup Type: $2" >> $MESSAGE echo "" >> $MESSAGE echo "Confirmation will be sent when backup completes." >> $MESSAGE echo "" >> $MESSAGE echo "THIS IS AN AUTOMATED EMAIL" >> $MESSAGE
/bin/mail -s "$SUBJECT" "$TO" < $MESSAGE echo "done" >> /tmp/test.txt rm $MESSAGE
James Beam
Networking is more than just cables and connectoins...
|