From 61839d5e3421a6997c04a40e5b956d0bf9d9066d Mon Sep 17 00:00:00 2001 From: Martin Selbmann Date: Tue, 22 Sep 2020 19:31:15 +0200 Subject: [PATCH] some optimations and bugfixes --- buzzer.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/buzzer.sh b/buzzer.sh index 9eeab89..77aed73 100755 --- a/buzzer.sh +++ b/buzzer.sh @@ -23,13 +23,6 @@ cmdonairstat=0 while true; do - if [ "$cmdonairstat" -eq 1 ]; then - - cmdonairstat=0 - $(command -v pkill) "$pgrepplayer" - - fi - buzzerstat="$($cmdgpio read $buzzgpio)" swupstat="$($cmdgpio read $swupgpio)" @@ -59,6 +52,8 @@ while true; do done echo "Off air!" + cmdonairstat=0 + $(command -v pkill) "$pgrepplayer" elif [ "$buzzerstat" -eq 1 ] && [ "$swupstat" -eq 0 ]; then sleep 0.1