2018-09-09 20:37:46 +02:00
|
|
|
#!/bin/sh
|
2018-09-09 19:39:42 +02:00
|
|
|
echo -e "\e[1;36m"Running apt-get update and apt-get dist-upgrade for you..."\e[0m"
|
2018-09-09 20:42:16 +02:00
|
|
|
sudo apt-get update > /dev/null && sudo apt-get dist-upgrade -y > /dev/null
|
2018-09-09 19:39:42 +02:00
|
|
|
echo -e "\e[1;36m"System successfully updated and upgraded!"\e[0m"
|
2018-08-28 12:49:02 +02:00
|
|
|
|
2018-09-09 19:45:12 +02:00
|
|
|
echo -e "\e[1;36m"Installing a few packages that are missing on Raspbian Stretch Lite..."\e[0m"
|
2018-09-09 20:42:16 +02:00
|
|
|
{
|
2018-09-09 20:15:29 +02:00
|
|
|
sudo apt-get install python3-pip -y
|
|
|
|
sudo apt-get install RPi.GPIO -y
|
|
|
|
sudo apt-get install python3-spidev -y
|
|
|
|
sudo apt-get install git -y
|
|
|
|
pip3 install Pillow
|
|
|
|
sudo pip3 install Pillow
|
|
|
|
sudo apt-get install libopenjp2-7-dev -y
|
|
|
|
sudo apt install libtiff5 -y
|
2018-09-09 20:42:16 +02:00
|
|
|
} > /dev/null
|
2018-08-28 12:49:02 +02:00
|
|
|
|
2018-09-09 19:39:42 +02:00
|
|
|
echo -e "\e[1;36m"Cleaning a bit of mess to free up some space..."\e[0m"
|
2018-09-09 20:42:16 +02:00
|
|
|
sudo apt-get clean > /dev/null && sudo apt-get autoremove -y > /dev/null
|
2018-09-09 19:39:42 +02:00
|
|
|
|
|
|
|
echo -e "\e[1;36m"Installing the E-Paper-Calendar Software"\e[0m"
|
2018-09-09 20:52:06 +02:00
|
|
|
git clone https://github.com/aceisace/Raspberry-Pi-Google-Calendar-with-E-Paper-display
|
2018-08-27 16:04:30 +02:00
|
|
|
mv Raspberry-Pi-Google-Calendar-with-E-Paper-display E-Paper-Master
|
2018-08-27 16:51:10 +02:00
|
|
|
rm /home/pi/E-Paper-Master/Packages-installer
|
2018-08-27 16:30:18 +02:00
|
|
|
|
2018-09-09 19:39:42 +02:00
|
|
|
echo -e "\e[1;36m"Installing a few required packages for the E-Paper Software"\e[0m"
|
2018-09-09 20:42:16 +02:00
|
|
|
{
|
2018-09-09 20:15:29 +02:00
|
|
|
sudo pip3 install pyowm
|
|
|
|
sudo pip3 install ics
|
|
|
|
pip3 install pyowm
|
|
|
|
pip3 install ics
|
2018-09-09 20:42:16 +02:00
|
|
|
} > /dev/null
|
2018-08-27 16:30:18 +02:00
|
|
|
|
2018-09-09 19:39:42 +02:00
|
|
|
echo -e "\e[1;36m"Setting up the script to start at boot..."\e[0m"
|
2018-09-09 20:42:16 +02:00
|
|
|
sudo apt-get install supervisor -y > /dev/null
|
2018-08-27 16:04:30 +02:00
|
|
|
|
2018-08-27 16:30:18 +02:00
|
|
|
sudo bash -c 'cat > /etc/supervisor/conf.d/E-Paper.conf' << EOF
|
2018-08-27 16:04:30 +02:00
|
|
|
[program:E-Paper]
|
2018-08-27 20:50:37 +02:00
|
|
|
command = sudo /usr/bin/python3.5 /home/pi/E-Paper-Master/Calendar/stable.py
|
2018-08-27 16:04:30 +02:00
|
|
|
stdout_logfile = /home/pi/E-Paper-Master/E-Paper.log
|
|
|
|
stderr_logfile = /home/pi/E-Paper-Master/E-Paper-err.log
|
|
|
|
EOF
|
2018-08-27 16:30:18 +02:00
|
|
|
|
2018-09-09 20:15:29 +02:00
|
|
|
sudo service supervisor start E-Paper
|
2018-09-09 20:20:35 +02:00
|
|
|
|
2018-09-09 19:55:53 +02:00
|
|
|
echo -e "\e[1;36m"The install was successful"\e[0m"
|
|
|
|
echo -e "\e[1;36m"The script will now start at every boot."\e[0m"
|
2018-09-09 20:03:19 +02:00
|
|
|
echo -e "\e[1;31m"Do not forget to add your iCal url and openweathermap API in the main script."\e[0m"
|