bpa wrote: > My suggestion is in the script. > > The following is my version which just creates lots of output to shows > which parts of script are executed. > Squeezelite V1.9.7-1283 was tested on a Rasbian Buster > Squeezelite is standard Ralphy and has GPIO build option. > Run from command line with "-S /home/pi/myscript.sh" > > > Code: -------------------- > > > #!/bin/sh > #---------------------------------------------------------------------------------------- > # Script for turning RPi3 USB output on/off when Squeezelite player is turned on/off. > # This script requires that extension uhubctl.tcz is installed. > # Enter the path to this "Power On/Off Script" on the pCP Squeezelite Settings page. > # https://github.com/mvp/uhubctl#raspberry-pi-b2b3b > #---------------------------------------------------------------------------------------- > # squeezelite -S /home/tc/usb-power-on-off.sh > # > # squeezelite sets $1 to: > # 0: off > # 1: on > #---------------------------------------------------------------------------------------- > NOW=$(date +"%m-%d-%Y %T") > echo "--- $NOW ---" >>/tmp/powerlog.txt > echo "Args: " "$@" >>/tmp/powerlog.txt > case $1 in > 0) echo "Arg dollar 1 value 0 " >>/tmp/powerlog.txt ;; > 1) echo "Arg dollar 2 value 1 " >>/tmp/powerlog.txt ;; > esac > > echo "---- End run ---- " >>/tmp/powerlog.txt > -------------------- > > > Toggling power button on WebUI for player > > Code: -------------------- > > > --- 11-15-2020 11:49:12 --- > Args: 0 > Arg dollar 1 value 0 > ---- End run ---- > --- 11-15-2020 11:49:12 --- > Args: 1 > Arg dollar 2 value 1 > ---- End run ---- > --- 11-15-2020 11:49:13 --- > Args: 0 > Arg dollar 1 value 0 > ---- End run ---- > --- 11-15-2020 11:49:13 --- > Args: 1 > Arg dollar 2 value 1 > ---- End run ---- > -------------------- > >
I am using squeezelite v1.97-1282-pCP Running -S /home/tc/myscript.sh doesn't work from command line. I see "-sh: -S: not found" Adding it as a script in pCP also doesn't seem to do anything. Maybe my scripts aren't running for some reason. ------------------------------------------------------------------------ slartibartfast's Profile: http://forums.slimdevices.com/member.php?userid=35609 View this thread: http://forums.slimdevices.com/showthread.php?t=112760 _______________________________________________ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix