mherger wrote: 
> > 1) Since Upstart and Systemd are used in Debian/Ubuntu, LMS by
> default
> > is started before the network is up, which causes issues with thinks
> > like online radio stations, Spotify etc. My /etc/rc.local workaround
> is
> > fine, but not very nice. A structural solution would be better.
> 
> Anybody willing and able to come up with a solution?...
> 

I don't know about Upstart. A "proper" solution for systemd might be to
re-examine and rewrite the logic of the Debian init scripts into a
systemd unit file. In the process addressing/eliminating the quirky
squeezeboxserver_safe script.

As a hack to try out one could install a modified version of the
existing auto-generated service unit, and add a 'network-online'
dependency to it. It could look something like:


Code:
--------------------
    
  [Unit]
  SourcePath=/etc/init.d/logitechmediaserver
  Description=LSB: Startup script for the Logitech Media Server
  Before=multi-user.target
  Before=graphical.target
  After=all.target
  After=network-online.target
  Wants=network-online.target
  
  [Service]
  Type=forking
  Restart=no
  TimeoutSec=5min
  IgnoreSIGPIPE=no
  KillMode=process
  GuessMainPID=no
  RemainAfterExit=yes
  SuccessExitStatus=5 6
  ExecStart=/etc/init.d/logitechmediaserver start
  ExecStop=/etc/init.d/logitechmediaserver stop
  
--------------------


This is based on the auto-generated file
-/run/systemd/generator.late/logitechmediaserver.service-, but  I have
added the two 'network-online.target' lines with the intention of
preventing LMS from starting before the network.

The revised unit file should be saved as 
-/etc/systemd/system/logitechmediaserver.service-, and the system
restarted.

It works on my Debian system, but I have not tested that it actually
solves the network problem that it seeks to address, simply because I
don't have the problem.


------------------------------------------------------------------------
mrw's Profile: http://forums.slimdevices.com/member.php?userid=38299
View this thread: http://forums.slimdevices.com/showthread.php?t=112185

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to