diff --git a/RandomVideo.sh b/RandomVideo.sh index e9fde60..5456022 100755 --- a/RandomVideo.sh +++ b/RandomVideo.sh @@ -2,7 +2,8 @@ folder="/mnt/video" player="cvlc" -playerparam=" -q" +playerparam="--quiet" +pgrepplayer="vlc" swupgpio=23 swdowngpio=25 @@ -28,9 +29,9 @@ if [ "buzzer" != "$1" ] && [ "cron" != "$1" ]; then exit 1 fi -if $(command -v pgrep) "$player" > /dev/null; then +if $(command -v pgrep) "$pgrepplayer" > /dev/null; then if [ "$1" = "buzzer" ]; then - $(command -v pkill) "$player" + $(command -v pkill) "$pgrepplayer" elif [ "$1" = "cron" ]; then exit 1 diff --git a/buzzer.sh b/buzzer.sh index 6649370..c4f6938 100755 --- a/buzzer.sh +++ b/buzzer.sh @@ -5,7 +5,7 @@ strobogpio=2 swupgpio=23 swdowngpio=25 -player="cvlc" +pgrepplayer="vlc" cmdgpio="$(command -v gpio)" @@ -36,8 +36,8 @@ while true; do elif [ "$swupstat" -eq 1 ]; then - if $(command -v pgrep) "$player" > /dev/null; then - $(command -v pkill) "$player" + if $(command -v pgrep) "$pgrepplayer" > /dev/null; then + $(command -v pkill) "$pgrepplayer" fi while [ "$swupstat" -eq 1 ]; do