midgetspy/Sick-Beard — pull request #279 by tecnobrat (2012-01-26 03:02:43+00:00)
Title: Cleans up stale pid files in the init.ubuntu script

start-stop-daemon's behavior is to check for the existence of a pid file, but doesn't ensure the pid listed inside is running. Instead it checks that the pid file exists, and if the exec command exists in the process-list. Since the python command isn't unique enough (/usr/bin/python), it thinks its still running.

This simply cleans up pid files which don't have a live pid in them, causing the rest of the behavior to work properly.