puppetlabs/puppetdb — pull request #166 by grimradical (2012-05-23 23:22:21+00:00)
Title: (#14586) Incorrect start-stop-daemon args in Debian init script

When we try to stop the daemon, we were passing in `--name puppetdb` instead of
`--exec $JAVA_BIN`. Since our process isn't actually named puppetdb, that
initial call wouldn't actually terminate the process. It would then
fall-through to a second code path where the init script would then try to kill
*all* processes with $JAVA_BIN as the executable. That's, like, not so great
and stuff.

I've corrected the args to start-stop-daemon to use both the pidfile and the
executable name to give us a precise match. With that in place, the secondary
code path is no longer necessary.

A pleasant side-effect of this fix is that now stopping PuppetDB is extremely
fast, instead of taking 30 seconds or so.

Signed-off-by: Deepak Giridharagopal