'script.sh' hinzufügen

This commit is contained in:
Kaisa Marysia 2019-02-05 19:26:09 +01:00
parent 0621c88e5c
commit 9532298bcb

23
script.sh Normal file
View file

@ -0,0 +1,23 @@
#!/bin/sh
# get rid of the cursor so we don't see it when videos are running
setterm -cursor off -background white -foreground white
# set here the path to the directory containing your videos
VIDEOPATH="/home/pi/Videos/"
# you can normally leave this alone
SERVICE="omxplayer"
# now for our infinite loop!
while true; do
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
sleep 2;
else
for entry in $VIDEOPATH/*
do
clear
omxplayer -r -o hdmi --aspect-mode fill $entry 1>/dev/null 2>/dev/null
done
fi
done