diff --git a/buzzer.sh b/buzzer.sh index c992090..fde5852 100755 --- a/buzzer.sh +++ b/buzzer.sh @@ -53,10 +53,9 @@ while true; do swupstat="$($cmdgpio read $swupgpio)" - - while [ ! -z "$($(command -v pgrep) "$pgrepplayer")" ]; do + if $(command -v pgrep) "$pgrepplayer" > /dev/null; then $(command -v pkill) "$pgrepplayer" - done + fi echo "Off air!" cmdonairstat=0