[INIT SCRIPT] PS3 Media Server Debian/Ubuntu init script

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Re: PS3 Media Server Debian/Ubuntu init script

Postby RyLoS » Thu Jul 23, 2009 12:16 pm

I invite all people with troubles getting started the script at start-up to read CAREFULLY this HOW-TO on update-rc.d command (for Ubuntu and Debian):

http://www.debuntu.org/how-to-manage-services-with-update-rc.d
RyLoS
 
Posts: 15
Joined: Wed Mar 04, 2009 3:50 pm

Re: PS3 Media Server Debian/Ubuntu init script

Postby arie » Thu Jul 23, 2009 9:47 pm

Hi,

I have managed to run the command without an error.
However the media server is not found (presumably not started) unless i log into Ubuntu and start the script either directly or using the following command
'sudo /etc/init.d/PS3MediaServer start'


Same problem here. After booting I checked and the process is not running. The log file contains these lines:

[main] TRACE 15:43:56.716 Scanning network interface lo / lo
[main] TRACE 15:43:56.726 Using localhost address
[main] TRACE 15:43:56.727 Created socket: 0.0.0.0/0.0.0.0:5001
[Thread-1] TRACE 15:43:56.940 Starting DLNA Server on host 127.0.1.1 and port 5001...
[main] TRACE 15:43:57.025 Sending ALIVE...
[main] TRACE 15:43:57.028 Unable to retrieve MAC address for UUID creation: using a random one...
[main] TRACE 15:43:57.174 Using following UUID: fe63124b-83d5-4a14-8a85-287bec4743fe
[Thread-3] TRACE 15:43:58.297 Sending BYEBYE...

Any ideas?
arie
 
Posts: 1
Joined: Thu Jul 23, 2009 9:40 pm

Re: PS3 Media Server Debian/Ubuntu init script

Postby G33K » Mon Aug 24, 2009 11:55 pm

Script works fine for me but I'd like to propose a change in the PS3MediaServer init.d script:

Line 68:
Code: Select all
    start-stop-daemon --stop --signal 2 --retry 5 --quiet --name java


changed to
Code: Select all
    start-stop-daemon --stop --signal 15 --retry 5 --quiet --name java



The problem I had with the original script was when I stopped the daemon (/etc/init.d/PS3MediaServer stop) it stopped the media server but it would continue showing on the PS3 because the connection was not terminated. It works fine after the change.
G33K
 
Posts: 1
Joined: Mon Aug 24, 2009 11:47 pm

Re: PS3 Media Server Debian/Ubuntu init script

Postby bombino » Fri Sep 04, 2009 8:42 am

I'm sure this is a noob question, but it seems that the server isn't nearly as chatty when running as a daemon. e.g.- I have to manually search for a media server now, from XMB, whereas with the original PMS.sh, the server would connect and disconnect almost in real-time. I did mod the signal from 2 to 15, but saw no change, the server is still listed on XMB once the PID is killed / service stopped. How would one turn those alive messages back on?
[EDIT: my mistake, looks like there's a DNLA hello delay in XMB3.0, when remoteplay is enabled. I was using a PSP to monitor the PS3 while working on the server. My mistake]

Also, my PMS.conf isn't being loaded when using the daemon PMS.sh, not sure how to add this back in. Any help would be greatly appreciated.
[EDIT: this is still an issue for me, would someone please let me know how to point the daemon at the PMS.conf file?]

Thanks very much
Tony
bombino
 
Posts: 5
Joined: Fri Sep 04, 2009 6:58 am

Re: PS3 Media Server Debian/Ubuntu init script

Postby mushroomblue » Mon Sep 07, 2009 3:35 am

bombino wrote:Also, my PMS.conf isn't being loaded when using the daemon PMS.sh, not sure how to add this back in. Any help would be greatly appreciated.
[EDIT: this is still an issue for me, would someone please let me know how to point the daemon at the PMS.conf file?]


what I did was log in as the user who runs PMS.sh, and run it from that directory, in my case /opt/pms/.

according to the script, it's only going to look in the current directory. the PS3MediaServer script cd's to that directory first, then runs the script.

alternatively, you can take your existing PMS.conf, and database/ directory, and copy them to where pms is located.

hope this helps.
mushroomblue
 
Posts: 3
Joined: Sun Jul 26, 2009 6:30 pm

Re: PS3 Media Server Debian/Ubuntu init script

Postby bombino » Wed Sep 09, 2009 12:49 am

mushroomblue wrote:
bombino wrote:Also, my PMS.conf isn't being loaded when using the daemon PMS.sh, not sure how to add this back in. Any help would be greatly appreciated.
[EDIT: this is still an issue for me, would someone please let me know how to point the daemon at the PMS.conf file?]


what I did was log in as the user who runs PMS.sh, and run it from that directory, in my case /opt/pms/.

according to the script, it's only going to look in the current directory. the PS3MediaServer script cd's to that directory first, then runs the script.

alternatively, you can take your existing PMS.conf, and database/ directory, and copy them to where pms is located.

hope this helps.


I moved PMS.conf to the app root and it worked like a charm.
Thanks very much for the help.
bombino
 
Posts: 5
Joined: Fri Sep 04, 2009 6:58 am

Re: PS3 Media Server Debian/Ubuntu init script

Postby gaboalonso » Wed Sep 09, 2009 6:33 am

Sorry, just moved to linux and i'm a totally noob to it.
I have just configured ps3ms as a "linux service" and it seems to work ok. However, how can i access the GUI so i can change settings? it has to be somewhere since it's running.

In windows, the PS3MS icon will show up in the system tray so you can open the gui, even if it has been started as a service.

thanx for your help.
gaboalonso
 
Posts: 15
Joined: Wed Sep 09, 2009 6:29 am

Re: PS3 Media Server Debian/Ubuntu init script

Postby russdot » Tue Oct 13, 2009 2:26 am

I am having the same problem as arie. The daemon only picks up the loopback 'lo' interface when starting at boot and then creates the socket at 0.0.0.0:5001 instead of picking up interface 'eth0' and creating the socket at 192.168.1.100:5001.

Any ideas on how to fix this??
I'm using Ubuntu 8.10 and my ps3mediaserver is located in /usr/local/pms

This is what the log file looks like when the daemon starts at boot-up:
Code: Select all
[main] TRACE 15:43:56.716 Scanning network interface lo / lo
[main] TRACE 15:43:56.726 Using localhost address
[main] TRACE 15:43:56.727 [b]Created socket: 0.0.0.0/0.0.0.0:5001[/b]
[Thread-1] TRACE 15:43:56.940 Starting DLNA Server on host 127.0.1.1 and port 5001...
[main] TRACE 15:43:57.025 Sending ALIVE...
[main] TRACE 15:43:57.028 Unable to retrieve MAC address for UUID creation: using a random one...
[main] TRACE 15:43:57.174 Using following UUID: fe63124b-83d5-4a14-8a85-287bec4743fe
[main] TRACE 15:44:05.023 It's ready! You should see the server appears on XMB


This is what the log file looks like after logging in, then stopping the daemon with '/etc/init.d/PS3MediaServer stop' and starting it with '/etc/init.d/PS3MediaServer start'
Code: Select all
[main] TRACE 15:43:56.716 Scanning network interface eth0 / eth0
[main] TRACE 15:43:56.726 Using address /192.168.1.100 found on network interface: name:eth0 (eth0) index: 2 addresses: /192.168.1.100;
[main] TRACE 15:43:56.727 [b]Created socket: /192.168.1.100:5001[/b]
[Thread-1] TRACE 15:43:56.940 Starting DLNA Server on host 192.168.1.100 and port 5001...
[main] TRACE 15:43:57.025 Sending ALIVE...
[main] TRACE 15:43:57.174 Using following UUID: f1ba2f3e-8c20-317a-a5fb-de483e6dbff0
[main] TRACE 15:44:05.023 It's ready! You should see the server appears on XMB
russdot
 
Posts: 6
Joined: Sun May 24, 2009 4:55 am

Re: PS3 Media Server Debian/Ubuntu init script

Postby matt » Thu Oct 15, 2009 9:53 pm

Most likely the daemon is attempting to start up before networking has ran. Set it to S99 or similar so it starts up very late in the boot process.
matt
 
Posts: 1
Joined: Thu Oct 15, 2009 9:50 pm

Re: PS3 Media Server Debian/Ubuntu init script

Postby Kaos » Fri Oct 23, 2009 4:07 am

I'm trying to get this working on a fresh Jaunty install but the instructions aren't so clear. I intend to work through the issue, just had some questions.

[*]Unzip the script and put it in /etc/init.d
I placed the PS3MediaServer file in /etc/init.d - I then renamed the original PMS.sh to PMS.sh.orig and moved the new one into the pms directory, is this correct?

[*]Edit the script (which one? both? seems like both), the only thing you need to edit is the PMS_HOME variable and write your path to PS3 Media Server (in my case /opt/pms).
Looking through the PS3MediaServer file there is no "PMS_HOME" in the file. There is a "PMS_ROOT" which I've set to the directory where I have the pms files.

In the new PMS.sh the following is what refers to PMS_HOME:

# Setup PMS_HOME
if [ "x$PMS_HOME" = "x" ]; then
PMS_HOME=`cd $DIRNAME/; pwd`
fi
export PMS_HOME

Do I just edit "x" here?

[*]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 +x PS3Mediaserver"
[*]If you want to autostart the service on boot type "sudo update-rc.d PS3MediaServer defaults 90"

Thanks!
Kaos
 
Posts: 1
Joined: Fri Oct 23, 2009 3:54 am

PreviousNext

Return to Linux/Unix Support

Who is online

Users browsing this forum: No registered users and 8 guests