On Thu, Jul 08, 2010 at 09:22:28AM -0700, Russ Allbery wrote: > Guillem Jover <guil...@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. :) -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
signature.asc
Description: Digital signature