Contains python control script, Android app code, schematics, and an installer script to automate installation on the Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

  1. #!/bin/bash
  2. echo "This script will install the bottlepy web server and allow you to control and monitor the state of your smart garage door opener."
  3. sleep 1
  4. echo "Before running this script, make sure you've configured your network and done a sudo apt update && sudo apt upgrade, so your system is up to date."
  5. sleep 1
  6. echo "The default password is xxxx. YOU MUST CHANGE THIS AS IT IS VERY INSECURE."
  7. sleep 1
  8. read -r -p "Press y to acknowledge and continue running the script. [y/N] " response
  9. if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]
  10. then
  11. echo "Making directory..."
  12. mkdir garagedoor && cd garagedoor
  13. sleep 0.5
  14. echo "Installing Bottlepy..."
  15. pip install bottle
  16. sleep 0.5
  17. echo "Getting latest py file..."
  18. wget https://raw.githubusercontent.com/Rav4s/Pi-Garage-Door-Opener/master/Python_script_for_garage_door.py
  19. sleep 0.5
  20. echo "Editing /etc/rc.local for auto startup..."
  21. sed 'x; ${s/.*/python3 /home/pi/Python_script_for_garage_door.py &/;p;x}; 1d' /etc/rc.local
  22. sleep 0.5
  23. echo "Successful install! Rebooting in 5 seconds!"
  24. sleep 5
  25. sudo shutdown -r now
  26. else
  27. echo "Bye!"
  28. exit 1
  29. fi
  30. exit 0