Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jun 2003 15:29:39 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Santos <sansan@cas.port995.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Periodic scripts
Message-ID:  <20030608142939.GA91073@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <3EE327E4.1040304@cas.port995.com>
References:  <3EE327E4.1040304@cas.port995.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jun 08, 2003 at 01:11:16PM +0100, Santos wrote:
> Why there is a weekly script that rebuilds the locate database when:
>=20
> >>> WARNING
> >>> Executing updatedb as root.  This WILL reveal all filenames
> >>> on your machine to all login users, which is a security risk.
>=20
>=20
> Is there a way to put dates on the periodic scripts report output for=20
> those who redirect the reports to files instead of mail messages? There=
=20
> is no easy way to tell what date a report belongs to.

Create a 'timestamp' periodic job, which does nothing except print out
the date at which it is invoked.  Save this as, say,
/etc/periodic/daily/000.timestamp to ensure that it gets run as the
first job.  The timestamp script should return exit code 1 to ensure
that the periodic script knowns it has produced output that should be
included in the report:

    #!/bin/sh
    #
    # Emit timestamp at start of daily periodic run

    date +"Daily run started at %H:%M %p %Z on %d/%m/%Y"
    exit 1

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--wac7ysb48OaltWcw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE+40hTdtESqEQa7a0RAgC9AJ9uo1pwU+cLBvNfaGeLyUJaNY2ReQCfc+Hs
WOEYbMMTYWe1M0Hpw9qqe2Q=
=/xlm
-----END PGP SIGNATURE-----

--wac7ysb48OaltWcw--



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