Date: Sat, 16 Jan 2010 17:11:48 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Anton Shterenlikht <mexas@bristol.ac.uk> Cc: freebsd-questions@freebsd.org Subject: Re: getting firewall logs via /etc/periodic/daily ? Message-ID: <4B51F354.1090608@infracaninophile.co.uk> In-Reply-To: <20100116165331.GK91835@mech-cluster241.men.bris.ac.uk> References: <20100116165331.GK91835@mech-cluster241.men.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig26A2E700352C9F5F02098BEF Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Anton Shterenlikht wrote: > I'd like to receive the firewall logs together > with the usual /etc/periodic/daily email. > What's the easiest/safest way to achieve this? >=20 > Shall I add my own script under /etc/periodic/daily? > Shall I modify an existing script, e.g. 310.accounting? Sure -- you can add your own scripts to the periodic jobs. For things th= at aren't part of the base system, the usual place is=20 /usr/local/etc/periodic/{daily,weekly,monthly,security} If you decide to adapt one of the system scripts to do what you want, it'= s best to copy it to /usr/local/periodic/whatever/ and change the prefix of= the configuration variables inside it. When writing a periodic script, you generally want the following boilerplate at the top of the file: # If there is a global system configuration file, suck it in. # if [ -r /etc/defaults/periodic.conf ] then . /etc/defaults/periodic.conf source_periodic_confs fi plus you should take care to set the return code of the script carefully:= 0 means 'everything OK', 1 means 'you might want to look at this output',= 2 means 'oops, you configured the script wrong' and >2 means 'it's all go= ne a bit pear shaped'. periodic(8) has more detail. Cheers, Matthew=20 --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig26A2E700352C9F5F02098BEF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAktR81kACgkQ8Mjk52CukIwoWwCeKG5ZZG8+mQxONV2WpAw3z5nM tNEAoI4Kh0txZYZuYHgHCEfEwTvKCJCN =cSYI -----END PGP SIGNATURE----- --------------enig26A2E700352C9F5F02098BEF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B51F354.1090608>