From 929f3dec26b7bbb0d3b9b74d6a216bf54aa0b1e5 Mon Sep 17 00:00:00 2001 From: mmaster Date: Sun, 23 Aug 2020 04:08:43 +0200 Subject: [PATCH] set player as variable for pgrep and pkill --- RandomVideo.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RandomVideo.sh b/RandomVideo.sh index 93db886..2047c58 100755 --- a/RandomVideo.sh +++ b/RandomVideo.sh @@ -18,12 +18,12 @@ if [ "buzzer" != "$1" -a "cron" != "$1" ]; then exit 1 fi -if $(command -v pgrep) omxplayer > /dev/null; then +if $(command -v pgrep) "$player > /dev/null; then if [ "$1" = "buzzer" ]; then - $(command -v pkill) omxplayer + $(command -v pkill) $player elif [ "$1" = "cron" ]; then - exit 0 + exit 1 fi