[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#445203: debian-policy: 10.8. Log files: /etc/logrotate.d/<package> preferred



On snein 11 July 2010, Steve Langasek wrote:
>   On Thu, Jul 08, 2010 at 09:22:28AM -0700, Russ Allbery wrote:
> > Guillem Jover <guillem@debian.org> writes:
> > > On Wed, 2010-07-07 at 08:59:24 -0700, Russ Allbery wrote:
> > >> +    postrotate
> > >> +        [ -f /var/run/foo.pid ] && kill -s HUP `cat /var/run/foo.pid`
> > >> +    endscript
> > > 
> > > Probably better to recommend using start-stop-daemon, as it's more
> > > robust and should properly handle for example the case of a stale pid
> > > file pointing to the wrong binary (which with HUP might terminate an
> > > unsuspecting victim).
> > 
> > Good point.  I now have:
> >     postrotate
> >         start-stop-daemon -K -p /var/run/foo.pid -s HUP -x /usr/sbin/foo
> >-q endscript
> 
> Heh, that's just makes me want to weep at the awkwardness of duplicating
> information that should be encapsulated in the init script. :)  I really
> think "/etc/init.d/$foo reload" makes a more suitable example, but I at
> least don't think the above is wrong - so no objections.  I'll just focus
> on making sysvinit scripts obsolete by way of upstart, I think. :)

I would also use Steve's suggestion as the most straightforward example. 

Proposal seconded either with Rus's line quoted above or Steve's suggested 
line for postrotate.


Thijs

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: