Bug#445203: debian-policy: 10.8. Log files: /etc/logrotate.d/<package> preferred
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
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: