[Cialug] A little shell-script like help?

Nathan C. Smith nathan.smith at ipmvs.com
Sat Oct 17 15:39:34 CDT 2009



I'm trying to configure Bacula to send me the results of operations and requests for interventions using jabber.  I'm not sure what needs to be escaped or how.

Here is what the native mailcommand looks like in the Bacula configuration file.

mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"

And sendxmpp has worked well for me like this from the command line:

echo "hello" | sendxmpp -u username -p password  -j jabber.domain.com recipient at jabber.domain.com

So I'm trying to combine them but I'm unfamiliar with all the escaping I will need to do for quotes within quotes and not sure of all the rules related to the use of the echo command.  Is the /" enough to escape and include the quotes in the command?  I'm happy to hardcode the XMPP settings I will need.

mailcommand = "echo /" %t %e of %c %l  /" | /usr/bin/sendxmpp -u username -p password -j jabber.domain.com username at jabber.domain.com"

Thanks for any assistance.

-Nate


More information about the Cialug mailing list