'script.sh' hinzufügen
This commit is contained in:
parent
0621c88e5c
commit
9532298bcb
1 changed files with 23 additions and 0 deletions
23
script.sh
Normal file
23
script.sh
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue