Make scripts and binary executable after updating
authorCameron Ball <c.ball1729@gmail.com>
Fri, 27 Mar 2015 07:54:05 +0000 (07:54 +0000)
committerCameron Ball <c.ball1729@gmail.com>
Fri, 27 Mar 2015 07:54:05 +0000 (07:54 +0000)
README.md
update.sh

index c2cacb9..46701d5 100644 (file)
--- a/README.md
+++ b/README.md
@@ -24,5 +24,6 @@ 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
 ```
index ecd5fd2..1ade7ea 100755 (executable)
--- a/update.sh
+++ b/update.sh
@@ -28,6 +28,8 @@ if [[ -e "/mnt/usb-update/update.zip" ]] && [[ -e "/mnt/usb-update/update.sig" ]
   openssl dgst -sha256 -verify public.pem -signature /mnt/usb-update/update.sig /mnt/usb-update/update.zip > /dev/null 2>&1
   if [[ $? = 0 ]]; then
     (unzip -o /mnt/usb-update/update.zip -d /home/pi > /dev/null 2>&1 && printf "\tOK\n") || printf "\tExtract failure\n"
+    chmod +x start.sh
+    chmod +x update.sh
   else
     printf "\tSignature failure\n"
   fi