added install script
This commit is contained in:
parent
cae800f4ff
commit
4da5af7492
20
install/install.sh
Normal file
20
install/install.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
sudo apt install unzip
|
||||||
|
sudo rm -rf /home/$USER/aped
|
||||||
|
unzip app.zip -d /home/$USER/aped
|
||||||
|
cp /home/$USER/aped/XML/default.xml /home/$USER/aped/XML/config.xml
|
||||||
|
sudo apt install python3 python3-pip python3-lxml
|
||||||
|
sudo pip3 install Flask Flask-API RPi.GPIO lxml
|
||||||
|
touch /tmp/aped
|
||||||
|
echo "@reboot root python3 /home/$USER/aped/app.py" > /tmp/aped
|
||||||
|
sudo mv /tmp/aped /etc/cron.d/aped
|
||||||
|
sudo chown root /etc/cron.d/aped
|
||||||
|
echo "to trigger the cron job the Pi will restart in:"
|
||||||
|
count=10
|
||||||
|
(( ++count ))
|
||||||
|
while (( --count > 0)); do
|
||||||
|
echo $count
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
echo "Rebooting!"
|
||||||
|
sudo reboot
|
Loading…
x
Reference in New Issue
Block a user