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.
  
#!/bin/sh
#
SUBJECT="Backup for Production Server: $1 has started."
TO="[email protected]"
MESSAGE="/tmp/message.txt"
  
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...
  


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
BackupPC-users mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to