From: Cameron Ball Date: Tue, 14 Apr 2015 16:28:08 +0000 (+0800) Subject: Fix path X-Git-Url: http://cameron1729.xyz/?p=hdmi-switcher.git;a=commitdiff_plain;h=d5470bda2975aaee0ff159010022c94880f892f4 Fix path --- diff --git a/README.md b/README.md index e1933c3..36c57f3 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Script Automation ================= The scripts assume the following: - An fstab entry for /dev/sda1 pointing to /mnt/usb-update -- Binary and scripts live in /home/pi/hdmi-switcher +- Binary, scripts and public.pem all live in /home/pi/hdmi-switcher The usb-update script will naively look to see if /dev/sda1 exists. If it does, it mounts it and then copies over any files on the drive with names config.ini, video.mp4 to the cwd. @@ -34,6 +34,5 @@ In addition, it will update the software on the Pi. Unlike when config.ini and v If you want to run the script on boot, you should use start.sh. start.sh runs the usb-update script, and then starts playing video.mp4 on a loop. It uses omxplayer (make sure whatever version you use has the --loop option). I would suggest simply adding the following to /etc/init.d/rc.local: ``` -cd /home/pi/hdmi-switcher /home/pi/hdmi-switcher/start.sh ``` diff --git a/update.sh b/update.sh index ea8eeea..42aee87 100755 --- a/update.sh +++ b/update.sh @@ -12,12 +12,12 @@ printf "\t\tMount OK\n" if [[ -e "/mnt/usb-update/config.ini" ]]; then printf "Found config.ini... " - (cp /mnt/usb-update/config.ini /home/pi > /dev/null 2>&1 && printf "\tCopy OK\n") || printf "\tCopy failure\n" + (cp /mnt/usb-update/config.ini /home/pi/hdmi-switcher > /dev/null 2>&1 && printf "\tCopy OK\n") || printf "\tCopy failure\n" fi if [[ -e "/mnt/usb-update/video.mp4" ]]; then printf "Found video.mp4... " - (cp /mnt/usb-update/video.mp4 /home/pi > /dev/null 2>&1 && printf "\tCopy OK\n") || printf "\tCopy failure\n" + (cp /mnt/usb-update/video.mp4 /home/pi/hdmi-switcher > /dev/null 2>&1 && printf "\tCopy OK\n") || printf "\tCopy failure\n" fi if [[ -e "/mnt/usb-update/update.zip" ]] && [[ -e "/mnt/usb-update/update.sig" ]]; then