Date: Mon, 3 Jul 2017 18:20:32 +0200 From: Matthias Fechner <idefix@fechner.net> To: FreeBSD Mailing List <freebsd-ports@freebsd.org> Subject: Best practice to tail a log and start it as service using rc.d scripts Message-ID: <62c231e8-74b0-8515-eb22-4e4edf6ff5e2@fechner.net>
next in thread | raw e-mail | index | archive | help
Dear all, I just in the process to test mailtrain (https://mailtrain.org/) and if it is working I would like to create a port for FreeBSD. That mailtrain can handle bounce message with postfix together it is necessary to tail the postfix log and pass it to mailtrain, using a command like this: tail -F -n +0 /var/log/maillog | nc localhost 5699 - Is there a best practice approach on how to do this on FreeBSD? I would require now a startup script in /usr/local/etc/rc.d to start this kind of tail or is there a better mechanism in FreeBSD available? If not, does anyone have some kind of template/example on how to start a program like tail as daemon so FreeBSD can stop/restart it with the service command? Thanks Matthias --=20 "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." -- Rich Cook
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?62c231e8-74b0-8515-eb22-4e4edf6ff5e2>