Usage is fairly simple, just rename and moved the attach file to /etc/init.d/plexmediaserver (or name it however you like), after you have set the RUNAS and SCRIPTPATH variables to the user you want the server to run as, and the full path to where the binary lives. It seems that init.d scripts don't like executables with spaces in their names (as far as I could tell), so I've built in a check that will rename the "Plex Media Server" binary to just PlexMediaServer, if needed.
Once you've done that, you can just do
service plexmediaserver start
to start the server up. Unfortunately I wasn't able to get it to support logging output to a file - hopefully the Plex team can compile in support to specify where to redirect stdout and stderr.
Here's general usage:
Usage: /etc/init.d/PlexMediaServer {start|stop|restart|reload|force-reload|status}
(You can see this by just doing ‘service plexmediaserver’)
Also, if you’d like to have it start automatically when your machine boots up:
sudo update-rc.d plexmediaserver defaults
I haven't tested this out yet, but it should work.
I don't have a readyNAS or run Slackware, but I imagine someone can repurpose this for those. Feel free to share here if you do.
Please let me know if anyone has problems, or suggestions. I imagine the server itself will probably be updated to support this kind of thing eventually, but I got impatient :)