From 5ef58f58a9062186282786f175066f11f4d1ff60 Mon Sep 17 00:00:00 2001 From: Martin Selbmann Date: Tue, 22 Sep 2020 20:23:21 +0200 Subject: [PATCH] foo --- buzzer.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/buzzer.sh b/buzzer.sh index 92c7d1b..6608aa9 100755 --- a/buzzer.sh +++ b/buzzer.sh @@ -22,7 +22,12 @@ $cmdgpio mode $swupgpio in cmdonairstat=0 while true; do - + + if [ "cmdonairstat" -eq 1 ]; then + $(command -v pkill) "$pgrepplayer" + cmdonairstat=0 + fi + buzzerstat="$($cmdgpio read $buzzgpio)" swupstat="$($cmdgpio read $swupgpio)" @@ -50,9 +55,6 @@ while true; do sleep 0.1 done - $(command -v pkill) "$pgrepplayer" - cmdonairstat=0 - elif [ "$buzzerstat" -eq 1 ] && [ "$swupstat" -eq 0 ]; then sleep 0.1