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