learningequality/ka-lite — pull request #876 by gimick (2013-10-26 17:10:12+00:00)
Title: fixup start/stop to prevent duplicate servers

Fixes duplicate cron server processes issue

cherrypyserver now checks that:
port <1024 and port is available
If the PID file contains an incorrect value, or the file is missing, will now attempt to use that port to load a new url "/getpid/" which will return the os.getpid()value if kalite is running there.
Will then attempt to shutdown using the discovered PID

Tested on linux, but not on Windows.