How (where) to delay squeezebox service start?

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
den_hr
Posts: 13
Joined: Tue Jan 31, 2017 7:47 pm

How (where) to delay squeezebox service start?

Post by den_hr »

I'm using OrangePi PC Plus for a Squeezebox server/player (with Squeezelite), and it works extremely well :)

However, I do have one problem: the list of Internet radio stations is usually empty, until I restart LMS (Squeezebox) server.
I've had such problems before on other boards and architectures, and the reason is usually that the LMS (Squeezebox) server is started a bit early, and does not see the network yet (I'm using wifi, so that's probably a part of the problem, since wifi also takes a while to start properly). Squeezebox server checks if "mysqueezebox.com" site is available upon startup, I think - if it doesn't find it, it does not list some online services - Internet Radio being one of them.
So, in order to have the list of Internet radios available, you usually have to restart LMS server.
In order to avoid that hassle, I'm trying to delay the LMS (Squeezebox) service startup until wifi is online- but, for the life of me, can't find how to do that!

So, I'd appreciate if anyone could point me in the right direction - i.e. how to delay the start of squeezebox service for a couple of seconds (I'll try a delay of about 10 seconds, and see if that helps). In short, I need to make sure that squeezebox (LMS) service is started only after the wifi is connected...

Thanks for any pointers!

Regards,

Denis
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: How (where) to delay squeezebox service start?

Post by Fourdee »

Hi,

DietPi starts all services during boot, so you'd need to restart the service is question after this.

Add the following to end of /etc/rc.local (before the exit 0 line):

Code: Select all

sleep 10 && systemctl restart squeezebox &
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply