syslog.conf - log records to a script
Ernie Luzar
luzar722 at gmail.com
Tue Apr 4 19:21:56 UTC 2017
Hello list;
In syslog.conf I have these 2 lines.
local0.* /var/log/security
local0.* | exec /usr/local/bin/ipf.table
The security log file is being populated and working fine.
Now I want to pipe the same log records to a script for processing.
I'm using a very simple script to verify that the test script is being
handed all the log records. My test ipf.table script looks like this,
#! /bin/sh
read line
echo "$line" >> /var/log/ipf.table.log
When I issue "service syslogd restart" I get no errors.
The ipf.table.log gets populated with the first log record and them
nothing happens after that even though I can see more entries being
logged to /var/log/security.
What am I doing wrong here?
Thanks for your help.
More information about the freebsd-questions
mailing list