5 Jul
2008
5 Jul
'08
5:14 p.m.
Hi Joe I understand what you say, but it is sometimes that in not usesyslog-ng: what I would know where and how I should use this script, maybe astemplate into syslog-ng.conf? And if is true how I should use? sorry for this banal question tanks in advance Luigi Fegan, Joe ha scritto: Use this template for your script. Modify it to send email $MSG to you, instead of sending it to /tmp/schrott. That should solve your problem. #!/bin/bash while read MSG do # Process the message $MSG. Do whatever you like with it. # Email it to someone. Whatever. Here we put it in a file. echo $MSG >> /tmp/schrott # We're finished with this message, wait for the next one. done # Read returned eof. This means "no more messages". Exit. exit 0