Auto update

krad kraduk at googlemail.com
Sun Apr 11 17:13:31 UTC 2010


On 11 April 2010 08:41, Doug Hardie <bc979 at lafn.org> wrote:

>
> On 10 April 2010, at 23:14, Jos Chrispijn wrote:
>
> > Can someone tell me if there is a way of generating an email on the
> moment that someone logs in to my FreeBSD server? The mail part (phpmail)
> will be easy; I don't know yet how to trigger and pass parameter to this
> script or redirect info to a file (that I then send by email).  Thanks.
>
> A cheesy way to do that is to use a popen ("tail -f /var/log/auth.log",
> "r") and then read that.  It will give you every login regardless of ssh,
> telnet etc.  You could then generate the emails from that.  I have no idea
> just how resource intensive this might be.  You would also have to ensure it
> got started by rc during boot._________________________


It shouldn't be to bad as I use that method to generate stats from log files
for snmp. The log files I tail have about 200 odd lines per second and the
boxes handle it fine. But they are decentish spec but not extravagant (dell
2850 with 4gig  ram)


More information about the freebsd-questions mailing list