automate youtube script copy and cron

install and configure vnc server and password (need to do handler for restart and handle password better)
This commit is contained in:
Pi
2019-02-26 12:32:36 -05:00
parent 4f5beb268b
commit 461f69fae2
5 changed files with 913 additions and 0 deletions

15
roles/youtube/files/youtube.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# play random youtube videos for up to 15 minutes
if pgrep -f chromium-browser >/dev/null
then
exit 0
else
DISPLAY=:0 /usr/bin/chromium-browser `shuf -n 1 /home/pi/Documents/facebook_url.list` &
sleep 10 && DISPLAY=:0 /usr/bin/chromium-browser `shuf -n 1 /home/pi/Documents/facebook_url.list` &
sleep 20 && DISPLAY=:0 /usr/bin/chromium-browser `shuf -n 1 /home/pi/Documents/facebook_url.list` &
sleep 30 && DISPLAY=:0 /usr/bin/chromium-browser `shuf -n 1 /home/pi/Documents/facebook_url.list` &
sleep 40 && DISPLAY=:0 /usr/bin/chromium-browser https://www.vtomb.com &
/usr/bin/perl -e 'sleep int rand 900' && /usr/bin/killall chromium-browser
fi