#694576 gkrellmd: PID file not removed by init.d script after stopping daemon

Package:
gkrellmd
Source:
gkrellm
Description:
GNU Krell Monitors Server
Submitter:
J G Miller
Date:
2012-11-27 23:51:04 UTC
Severity:
normal
#694576#5
Date:
2012-11-27 23:36:37 UTC
From:
To:
When gkrellmd is started with the supplied init.d script, it creates
a PID file, by default in /var/run/gkrellmd.pid

When gkrellmd is stopped with the supplied init.d script, it stops
the daemon but fails to remove the PID file.

Thus subsequent attempts to stop the non-running daemon causes the
script to try to kill a non running process and produce an error message.


# /etc/init.d/gkrellmd stop
Stopping gkrellmd: gkrellmd.

# /etc/init.d/gkrellmd stop
Stopping gkrellmd: start-stop-daemon: warning: failed to kill 1880: No such process
gkrellmd.


It is therefore suggested that the script should check to see if the daemon
really has been stopped by checking the PID in the process list, and then
if it has been successfully stopped, remove the PID file so that subsequent
attempts do not produce misleading messages and keep /var/run clean of non
running process PID files.