plexinc/plex-media-server-distro-scripts — pull request #63 by chrissearle (2013-05-10 20:55:38+00:00)
Title: PID file path in init.d script

After a power loss restart PMS refuses to start.

Having checked /var/run/plexserver.pid and the PMS logs - all we got in the Plex Media Server.log file was

May 10, 2013 22:15:39 [0xf5d626c0] INFO - Plex Media Server v0.9.7.22.510-8faeab3

and no processes.

Running by hand with LD_LIBRARY_PATH=/c/.plex /c/.plex/plexserver gave the clue - plex thought it was already running. This led to discovering the AS/PMS/pms.pid file

This pull request tells the init script to use the pid file created by PMS directly - and removes the flag to start-stop-daemon to create a pid file - since PMS still does this.

It would be nice if the PMS script when refusing to start due to already running could log this in the main PMS logfile too rather than just stdout - but that's a side discussion to this pull request :)