chill wrote: 
> I've added an 'uninstall' option to the script in 'post #137'
> (https://forums.slimdevices.com/showthread.php?113661-Start-restart-squeezelite-when-plug-in-USB-dac&p=1009335&viewfull=1#post1009335),
> and I corrected a problem with trying to write to pcp_<cardname>.log
> before the cardname was known

After coming back from a great day outside (snow, frozen sea (30 sq km))
I tested these new script.
It is working perfectly!

I uninstalled and installed and it works!

I accidentally run install when the speakers are not connected:

Code:
--------------------
    tc@musikbox:~$ sudo ./SQLITE-control.sh install
  1) Squeezelite output device found in /usr/local/etc/pcp/pcp.cfg = SoundSticks
  2) SoundSticks found on card
  cat: can't open '/proc/asound/card/usbid': No such file or directory
  3) SoundSticks idVendor =  and idProduct = 
  4) udev rules written to /etc/udev/rules.d/10-SoundSticks.rules
  5) etc/udev/rules.d/10-SoundSticks.rules added to /opt/.filetool.lst
  6) SQLITE-control.sh added to /opt/bootlocal.sh
  
  Installation complete
  Squeezelite is now set up to autostart/stop with SoundSticks power
  Backup and reboot ('pcp br') to enable
--------------------


The resulting udev rule is this:

Code:
--------------------
    SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="", ATTR{idProduct}=="", 
RUN+="/home/tc/SQLITE-control.sh restart SoundSticks $kernel"
  SUBSYSTEM=="usb", ACTION=="remove", RUN+="/home/tc/SQLITE-control.sh stop 
SoundSticks $kernel"
  
--------------------


But this is clear.
Maybe it would be better to not write anything when no DAC is found.



pi4 4gb picoreplayer with lms and squeezelite for usb inside an argon
one case
pi3b+ (7\" display, hifiberry dac+ pro) picoreplayer with
squeezlite/jivelite for hifiberry and bluetooth headphone inside a
smartipi touch case
two airport express
ikea symfonisk
------------------------------------------------------------------------
carsten_h's Profile: http://forums.slimdevices.com/member.php?userid=69113
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