Paul Webster wrote:
> Try adding this to the end of the vcgencmd
> >/dev/null 2>&1
> If not that it will be something similar (not at a pCP system to
> verify)
> Putting an ampersand (preceded by a space) at the end of the line might
> make the script run faster as the command would be run in background.
paul- wrote:
> Do as stated above, don't try to fork another process by adding an extra
> ampersand.
Thanks again Paul and paul-. Based on your comments I have updated
script hdmi-power-on-off.sh as follows:
Code:
--------------------
#!/bin/sh
#----------------------------------------------------------------------------------------
# Script for turning RPi HDMI output on/off when Squeezelite player is turned
on/off.
# This script requires that extension rpi-vc.tcz is installed.
# Extension rpi-vc.tcz is installed by selecting HDMI power off on the pCP
Tweaks page.
# Enter the path to this "Power On/Off Script" on the pCP Squeezelite
Settings page.
#----------------------------------------------------------------------------------------
# squeezelite -S /home/tc/hdmi-power-on-off.sh
#
# squeezelite sets $1 to:
# 0: off
# 1: on
# 2: initialising
#----------------------------------------------------------------------------------------
# Version: 0.2 2020-08-15 CJS
case $1 in
0) sudo vcgencmd display_power 0 >/dev/null 2>&1 ;;
1) sudo vcgencmd display_power 1 >/dev/null 2>&1 ;;
2) sudo vcgencmd display_power 1 >/dev/null 2>&1 ;;
esac
--------------------
Let me know if you have additional remarks.
| LMS 7.9.3 | Squeezebox Boom | RPi0W + pCP 6.1.0 + HiFiBerry DAC |
------------------------------------------------------------------------
CJS's Profile: http://forums.slimdevices.com/member.php?userid=68700
View this thread: http://forums.slimdevices.com/showthread.php?t=112748
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix