From 2b853c151b1823d55bad82b2d498793966a0bc06 Mon Sep 17 00:00:00 2001 From: Martin Selbmann Date: Tue, 22 Sep 2020 18:25:58 +0200 Subject: [PATCH] switch to cvlc: some bugfixes --- RandomVideo.sh | 7 ++++--- buzzer.sh | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) 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