SickBeard/Sick-Beard — pull request #1 by shtrom (2013-09-25 00:56:37+00:00)
Title: Pid removal

SickBeard is happy to create its own PID file, but doesn't remove it when
killed by start-stop-daemon(8). Upon being restarted, it find the previous P
file, assumes it hasn't been stopped properly, and refuses to restart.

This ini.d script change fixes that, by letting the stratup script remove th
PID file after start-stop-daemon(8) has terminated properly.

At the moment, this fix probably does not handle incorrect terminations such
power cuts well, as the PID file would still be there at the next boot, but
SickBeard process obviously not. This problem would probably be better fixe
by letting SickBeard check whether the PID recorded in the PID file is still
running SickBeard instance.