Version 3.0: Added PID file (thanks to Sylvain) && PID file management (no more multiple starts of the daemon by mistake)
Version 2.1: 'Going to perfection' version

Version 2.0: Completely reworked the way the script work (logging is now possible) - You need also to update the PMS.sh script (included)
Version 1.3: Added 2 variables in the script to run the daemon with the preferred credentials and moved the PID file to PMS_HOME
Version 1.2: Fixed a bug that prevented PMS.conf to be read by the init script
Version 1.1: Removed 'reload' option and added 'status' option (issuing a status option tells you if PS3 Media Server is running or not)
------------------------------------------------------------------------------------------------------------------------------------------------------------
I made myself this init script for Debian/Ubuntu based systems to use PS3 media server as a system service.
I followed strict ubuntu policies to create this script and it's working quite well.
IF YOU are using any older version, replace PMS.sh with the original bundled version of PS3MediaServer!!!!
Currently I'm using it on my Natty 11.04 server and it's working like a charm.
The logs are located in /var/log/pms and have a monthly file scheme.
[*]Unzip the script and put it in /etc/init.d
[*]Edit the script PMS_HOME variable and write your path to PS3 Media Server (in my case /opt/pms).
[*]Edit the PMS_USER and PMS_GROUP variables in the script to the user and group you want to use to launch the PS3 Media Server
[*]Make the script executable with command: "sudo chmod a+x PS3Mediaserver"
[*]If you want to autostart the PS3MediaServer on boot type "sudo update-rc.d PS3MediaServer defaults 90"
Enjoy it.NEW VERSION 3.0 AVAILABLE. PLEASE DONATE