Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Apr 2017 15:22:15 -0400
From:      Ernie Luzar <luzar722@gmail.com>
To:        FreeBSD questions <freebsd-questions@FreeBSD.org>
Subject:   syslog.conf - log records to a script
Message-ID:  <58E3F267.6000300@gmail.com>

next in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58E3F267.6000300>