PDA

View Full Version : Cannot autostart Squeecebox Center



Flim
2009-11-03, 09:07
In SSODS, I login as root/admin in telnet, and start the SBC - no problem there.

But I would like to have SBC to start every time I start my DS-107+

I get this error:

Skak> ln -s /opt/ssods4/etc/init.d/rc.ssods /usr/local/etc/rc.d/ssods.sh
ln: /usr/local/etc/rc.d/ssods.sh: Not a directory

Can anyone help me out here?

flipflip
2009-11-03, 09:17
You probably have a version of the DS firmware that does not have the /usr/local/etc/init.d directory (which can be used to start 3rd party applications). Newer firmwares have that.

You can create (or add to) a file /etc/rc.local, which is the other way to achieve the same:



#!/bin/sh
/opt/ssods4/etc/init.d/rc.ssods start


Be sure to also enable autostart in the SSODS web interface.

flip

Flim
2009-11-03, 09:48
Hi flip.

Thanks for the answer.

I still cannot get it to work.

I have tried to write:

#!/bin/sh
/opt/ssods4/etc/init.d/rc.ssods start

(in 2 lines, with a return in between)

which just strats the SBC. But when I restart my DS, the SBC does not start like I want it to.

What am I doing wrong? Can I check my system somehow that i have set the rights variables or something?

flipflip
2009-11-03, 09:59
What exactly does the command "/opt/ssods4/etc/init.d/rc.ssods start" print on screen when you run it in telnet?

Flim
2009-11-03, 10:19
It prints this:

Skak> #!bin/sh
Skak> /opt/ssods4/etc/init.d/rc.ssods start
SSODS: checking system ..... OK.
Starting SqueezeboxServer 7.4.1-28947 (stay tuned) ...... OK.
Updating /opt/ssods4/etc/sudoers .. OK.
Starting thttpd-ssods ...... OK.
Skak>

So the SBC starts right now, but when I restart my DS the SBC does not run

flipflip
2009-11-03, 10:53
OK, looks good.

At boot the script /etc/rc runs the command "sh /etc/rc.local" (if the file rc.local exists). So try if this works:

sh /etc/rc.local

You could make the script executable (chmod a+x /etc/rc.local) but I don't see how this would change anything.

You could add something like this to rc.local:

echo "hello" > /tmp/foobar

So you can check for if rc.local is run at boot because /tmp/foobar should then contain the word "hello". Do "cat /tmp/foobar" after reboot.

Flim
2009-11-03, 11:45
I have tried the following:

Before reboot:

I wrote:

Skak> sh /etc/rc.local

And nothing happened...

Then I wrote:

Skak> echo "hello" > /tmp/foobar

If I at this point write cat /tmp/foobar it writes out hello, like it is supposed to.

Then I reboot (by writing reboot), and after reboot I write:

Skak> cat /tmp/foobar
cat: /tmp/foobar: No such file or directory

After what you write, it seems that rc.local is not run at startup.

What to do?

flipflip
2009-11-03, 12:02
I wrote:

Skak> sh /etc/rc.local

And nothing happened...


Not good. Then something's wrong with that file. "cat /etc/rc.local" should print what is in the file. How did you write it? Try to create it again as follows:

echo "#!/bin/sh" > /etc/rc.local
echo "/opt/ssods4/etc/init.d/rc.ssods start" >> /etc/rc.local

Flim
2009-11-03, 12:15
Hmmm...

Here's what I now have written:

Skak> echo "#!bin/sh" > /etc/rc.local
Skak> echo "/opt/ssods4/etc/init.d/rc.ssods start" > > /etc/rc.local
-ash: Syntax error: redirection unexpected

I guess it's up to you again :-)

Edit: By the way. I haven't started SBC every time I rebooted. Should I have done that?

flipflip
2009-11-03, 12:17
Use copy+paste. There's a typo (you said "> >" but should read ">>").

Flim
2009-11-03, 12:23
Well, now it writes something out:

Skak> echo "#!bin/sh" > /etc/rc.local
Skak> echo "/opt/ssods4/etc/init.d/rc.ssods start" >> /etc/rc.local
Skak> sh /etc/rc.local
SSODS: checking system ..... OK.
Error: SqueezeboxServer is already running.
WARNING: rc.ssods ERROR: script /opt/ssods4/etc/init.d/S80squeezeboxserver failed.
Updating /opt/ssods4/etc/sudoers .. OK.
Starting thttpd-ssods .. skipping, alreading running with PID 2650.
Skak>

I can see an ERROR :-|

Can you solve that?

flipflip
2009-11-03, 12:25
That's okay. Because it is actually a "warning". Reboot and see if it works.

Flim
2009-11-03, 12:33
When I reboot, here's what it says:

Skak> sh /etc/rc.local
SSODS: checking system ..... OK.
Error: SqueezeboxServer is already running.
WARNING: rc.ssods ERROR: script /opt/ssods4/etc/init.d/S80squeezeboxserver faile
d.
Updating /opt/ssods4/etc/sudoers .. OK.
Starting thttpd-ssods .. skipping, alreading running with PID 2636.
Skak>

So now it seems like it works.

It's amazing...

You're amazing :-)

Btw - when I at x-mas (hopefully) gets a DS-209 will I be able to do as you wrote originally?

Flim
2009-11-04, 11:46
Hi again flip.

I have another problem.

None of my songs is shown when I choose to see all artists.

I have written this:

Skak> ln -sf /usr/syno/mysql/libexec/mysqld /opt/ssods4/bin/mysqld
Skak>


But nothing happened. I can see all the folders in the libary, by when I search for Album, Artist etc nothing is shown.

Can you help me here?