From cff1da2dae624b0f3454a5a9b86765da34b77128 Mon Sep 17 00:00:00 2001 From: eagleshot <****@****.com> Date: Sun, 11 Feb 2024 20:03:11 +0100 Subject: [PATCH] WIP Auto update --- README.md | 26 +++++++++++++++++++++----- script.sh | 10 +++++++++- updateScript.sh | 5 +++++ 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 updateScript.sh diff --git a/README.md b/README.md index 580071e..38da778 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,27 @@ * https://www.distrelec.ch/de/kunststoffgehaeuse-82x80x55mm-dunkelgrau-abs-ip67-rnd-components-rnd-455-01032/p/30128636 -'''bash -wget -O - https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/script.sh | sudo sh -''' +## Installation +### Initial Setup +```bash +wget -O - https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/script.sh | sudo sh +``` +### Update +```bash +wget -O - https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/updateScript.sh | sudo sh +``` + +# Next TODOs +- [ ] Modularization -> graphics +- [ ] Advanced scheduling (start and end date) +- [ ] Test raspberry pi hq camera +- [ ] Improved settings validation +- [ ] Improve setup script +- [ ] Primitive software update possibility + +-> get sample images for image processing +-> get solar panel -# TODOs ## Hardware - [X] Upgrade to Witty Pi 4 (non mini) - [X] Upgrade to Raspberry Pi Zero 2 W @@ -107,7 +123,7 @@ wget -O - https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/script.sh ## General - [ ] Extend documentation + improve installation script - * Add instruction: camera needs to be set to UTC time + * Add instruction: camera needs to be set to UTC time -> Should be done by installation script * Add instruction: default camera state needs to be set to "on" * Add instruction: Only works with raspberry pi os bullseye - [ ] Open source the project diff --git a/script.sh b/script.sh index e1cbd77..b7c7c5b 100644 --- a/script.sh +++ b/script.sh @@ -64,12 +64,18 @@ echo '========================================================================== wget -O /home/pi/main.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/main.py sudo chmod 777 /home/pi/main.py # Execution permissions -# Download sim7600x.py +# Download modules wget -O /home/pi/sim7600x.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/sim7600x.py # Download witty_pi_4.py wget -O /home/pi/witty_pi_4.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/witty_pi_4.py +# Download settings.py +wget -O /home/pi/settings.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/settings.py + +# Download fileserver.py +wget -O /home/pi/fileserver.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/fileserver.py + # Download config.yaml wget -O /home/pi/config.yaml https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/config.yaml @@ -129,6 +135,8 @@ sudo ufw enable # wget https://www.uugear.com/repo/WittyPi4/install.sh # sudo sh install.sh +# TODO: Add the updatescript to automatically update the software + # Add main.py to automatically run before wittyPi script # echo "sudo /usr/bin/python3 /home/pi/main.py" >> /home/pi/wittypi/afterStartup.sh diff --git a/updateScript.sh b/updateScript.sh new file mode 100644 index 0000000..7572ec1 --- /dev/null +++ b/updateScript.sh @@ -0,0 +1,5 @@ +wget -O /home/pi/main.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/main.py +wget -O /home/pi/sim7600x.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/sim7600x.py +wget -O /home/pi/witty_pi_4.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/witty_pi_4.py +wget -O /home/pi/settings.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/settings.py +wget -O /home/pi/fileserver.py https://raw.githubusercontent.com/Eagleshot/GlacierCam/main/fileserver.py