Bogg wrote: 
> Sorry, in my excitement for progress I wasn't too clear.
> Unfortunatly it only restarts once, and the restart command needs to be
> run each time.
> 
> Here's the new sudo output and log when it has worked
> Dac on (working) - dac off - dac on (not working) - run restart
> 
> > 
Code:
--------------------
  >   > tc@pCP:~$ sudo /home/tc/SQLITE-control.sh restart M6 1-1.2
  > tc@pCP:~$ No state is present for card M6
  > No state is present for card M6
  > 
--------------------
> > 
> 
> > 
Code:
--------------------
  >   > 
  > [     305.14] Script parameters: stop M6 1-1.2:1.1
  > [     305.14] Script parameters: stop M6 1-1.2:1.0
  > [     305.31] Script parameters: stop M6 1-1.2:1.2
  > [     305.33] Script parameters: stop M6 1-1.2
  > [     305.34] M6 on 1-1.2 removed
  > [     305.38] Stopping Squeezelite player: Squeezelite...
  > [     305.39] /tmp/M6.kername deleted
  > [     331.27] Script parameters: restart M6 1-1.2
  > [     331.28] M6 detected on 1-1.2
  > [     332.36] Restarting Squeezelite player...
  > Stopping Squeezelite player: Squeezelite...
  > Starting Squeezelite player: Squeezelite...
  > [     333.39] Squeezelite not running.
  > [     334.45] Restarting Squeezelite player...
  > Squeezelite is not running.
  > Starting Squeezelite player: Squeezelite...
  > [     335.48] Squeezelite not running.
  > [     336.54] Restarting Squeezelite player...
  > Squeezelite is not running.
  > Starting Squeezelite player: Squeezelite...
  > [     337.57] Squeezelite not running.
  > [     338.63] Restarting Squeezelite player...
  > Squeezelite is not running.
  > Starting Squeezelite player: Squeezelite...
  > [     339.67] Squeezelite not running.
  > [     340.73] Restarting Squeezelite player...
  > Squeezelite is not running.
  > Starting Squeezelite player: Squeezelite...
  > [     341.77] Squeezelite not running.
  > [     341.78] Squeezelite failed to initialize within 5 attempts.
  > [     356.94] Script parameters: restart M6 1-1.2
  > [     356.95] M6 detected on 1-1.2
  > [     358.02] Restarting Squeezelite player...
  > Squeezelite is not running.
  > Starting Squeezelite player: Squeezelite...
  > [     359.08] Squeezelite is running. PID=11530
  > [     359.15] Restoring alsa settings for M6
  > 
--------------------
> > 
> 

Well this has me completely confused I'm afraid.  What the above shows
is that the very same script, the one that is failing to start
Squeezelite after 5 attempts when triggered by the udev rule, works when
called manually from the command line. i.e.:
The udev rule calls the script at 331.27 seconds in:

Code:
--------------------
    [     331.27] Script parameters: restart M6 1-1.2
--------------------

This apparently failed to start Squeezelite 5 times.

The manual script call was at 356.94 seconds in:

Code:
--------------------
    [     356.94] Script parameters: restart M6 1-1.2
--------------------

This evidently managed to start Squeezelite at the first attempt.

And it's not even the script itself that is failing - it's being
triggered with the right parameters, the built-in restart command is
being called correctly and is attempting to start Squeezelite, but seems
to fail to work in the former case:

Code:
--------------------
    sudo /usr/local/etc/init.d/squeezelite restart
--------------------


I can see no reason for this, and what's doubly confusing is that I
don't see this behaviour with either of the USB DAC setups that I have
here, yet you clearly have a very standard setup.  I will have to think
carefully about how to isolate the problem.

Since I can't recreate the problem, the only way I can think to tackle
it is to ask you to do some experimenting:
At the point where you called the script manually, could you try some
different steps.  So, from the top:

1) Re-run the 'install' option but without the --nostop option. This
should recreate the rules file with both options. Reboot.
2) Disconnect the DAC. This should kill the Squeezelite process.

Code:
--------------------
    ps | grep squeezelite
  sudo /usr/local/etc/init.d/squeezelite status
--------------------

3) Reconnect the DAC. The expected behaviour would be for Squeezelite to
restart, but we know that in your case this is not working - it fails
after 5 attempts. At this point, instead of issuing the restart command
manually from the command line, let's see what's going on:

Code:
--------------------
    ps | grep squeezelite
  sudo /usr/local/etc/init.d/squeezelite status
--------------------


------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=113661

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to