This is totally a newb question. I have installed a OpenHome server/service on my LS-VL unit.

I have it running perfectly fine... however if I terminate my terminal session the server stop responding. And I can't figure out the life of me so that it would load during start up/reboot.

Just to let everyone know that I DO have it "running" manually. I have installed Java 1.6.0_34 for Marvell(Kirkwood), and it runs fine. But I can't seem to get it to run on it's own.

The installation steps are for the Synology NAS. So it's a bit different. I tried putting the following:

Code:

#!/bin/shsh /usr/local/bubbleserver/bubble.sh start

I have the above script in /etc/init.d/ call "launch" --- I also tried putting this same script in /etc/rc.d/rc2.d <<<--- Similar to what was suggested in the installation for Synology. However it doesn't start up for me on my Linkstation Pro LS-VL

I currently have bubbleupnp server in /usr/local/bubbleserver

if I manually run

Code:

java -jar BubbleUPnPServer.jar

or

Code:

./bubble.sh start

They both runs perfectly fine. I can go to http://<IP ADDRESS>:58050 and access the WebUI. I can even use my SGS3 to access the server and stream. BUT, as soon as I terminate the terminal session it kills itself (for obvious reasons).

Someone can tell me what I am doing wrong that it won't start up during a reboot?

TIA

Last edited by mbze430 on Mon Sep 10, 2012 12:16 am, edited 3 times in total.

Put the script into /etc/rc.d/extensions.d/ and ensure it is executable(e.g. chmod 700).Do NOT use ANY environment paths (e.g. $HOME). Use absolute pathsonly.If you NEED to use environment paths of a user, "source" the profile ofthe user (e.g. via ". /home/myuser/.profile" (Attention: there is a spacebetween the first dot and the slash)), before doing anything within thescript.The script gets started during bootup, where you will find circumstanceslike in a crontab script -> no environment loaded yet.

_________________Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

I made some changes to the bubble.sh (which was provided by the server app).

I also move "launch" script to /etc/rc.d/extensions.d

But same thing it won't start on a reboot. But manually executing either "launch" or "bubble.sh" it runs. but when I close/disconnect from the terminal the service quits

OH...if I issue this command from my Mac... it runs fine. Meaning that I can quit my terminal and the service continues to run. I am using this as a work around till I can figure out why my LS-VL not running the script.

Try to name the script with ".sh" extension.Is this REALLY the script content?If yes, the script will not work. There is a " missing in line 4 andthe case statement is not closed correctly, neither has it a validdefault case.You assumed that grep and awk are internal commands of thecommand shell (read: no absolute path used). Did you verfiedthis?

_________________Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

ok I got some help from the BubbleUPnPServer forum. and they have helped me modify the scripts. They run *PERFECTLY* now within Putty Termina service or in a Terminal (Mac). However in my Linkstation LS-VL still doesn't start the script during bootup.

NOW! If I do the following command from my Terminal (MAC), it will run perfectly and I can quit my terminal session and BubbleUPnPServer will continue to run. So I think it's something in my Buffalo Linkstation that won't run the script.

Are you sure, "dirname" is part of the shells internal commands?I am not.If it is NOT part of the internal shell commands, you need tospecify the complete path for calling.Test with "which dirname" on your LS if it is an internal command.If not, add the complete path, you got via "which dirname".During bootup, by default, there is NO environment set. So thereis NO enironment variable PATH available. You have to assume,that only shell internal commands can be called without a fullqualified path.Sorry, if I didn't expressed myself as concrete as possible in thefirst post.

Btw. the script "bubble.sh" is set as executable?

Edit: try to add a "nohup " in front of the script call in bubble.sh.

_________________Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

Ahh.. no wonder all the scripts are named that way ... guess there was a reason.

I will try that in the morning.

I just wanted to note something. For kicks/test... I tried adding the following in to the beginning of the twonky.sh. The result was that it completely fail to load Twonky and bubbleserver during boot up. After removing the two lines, twonky obviously started again. Does this bring any new information to the table?

Code:

cd /usr/local/bubbleserversh /usr/local/bubbleserver/launch.sh

this is the newest script provided by BubbleUPnPServer v0.6.2.. which btw runs fine when I do a ssh command

You should try to understand how Linux scripting and terminal sessions work.A script is (basically) nothing more than a sequence of shell commands.Instead of a script, you can execute line by line manually and will (mostly) getthe same result.A terminal session (e.g. telnet, ssh, ...) is a kind of redirected shell access.If you start a terminal session, "somewhere" is a configuration which tells thesystem what kind of shell should get started.Most systems automatically start the user profile (a file named .profile in theHOME directory of the user) when opening a terminal session shell.Within the user profile, the user environment is set (e.g. environment variableslike PATH, aliases ...).If you close the terminal session, EACH and EVERY child session (aka. shell) startedfrom this terminal session is stopped as well, no matter if you put the stuff intobackground or not.If you don't like to get your stuff stopped, you need to "detach" the child session.This is done either via coding of the application itself, or via "nohup" in front ofyour command and a "&" at the end.On bootup, there is no terminal session and no profile is loaded. Depending onthe boot sequence, even some devices might not be available.

You need to adapt your script (and ALL the child scripts) to deal with the circumstancesat bootup.Either set the profile yourself or export all the necessary environment stuff in thefirst script you use at bootup.A good start is a script, which sustains the closing of your terminal session.If you use optware (sorry that I didn't realised that earlier), you should use alsooptwares mechanism for bootup scripts (/opt/etc/init.d and script starting with S99).

_________________Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum