support for on air switch

This commit is contained in:
Martin Selbmann 2020-09-19 23:33:19 +02:00
parent 8726b98ac2
commit 6097e70c78
2 changed files with 15 additions and 0 deletions

View file

@ -5,6 +5,8 @@ strobogpio=2
swupgpio=23
swdowngpio=25
player="omxplayer"
cmdgpio="$(command -v gpio)"
$cmdgpio mode $buzzgpio in
@ -34,6 +36,10 @@ while true; do
elif [ "$swupstat" -eq 1 ]; then
if $(command -v pgrep) "$player" > /dev/null; then
$(command -v pkill) "$player"
fi
while [ "$swupstat" -eq 1 ]; do
if [ "$cmdonairstat" -eq 0 ]; then