From a8eea1d0d2ae9076d5eaca0cf9bfe93675a0e7f5 Mon Sep 17 00:00:00 2001 From: Ace Date: Sun, 9 Sep 2018 21:22:19 +0200 Subject: [PATCH] Installer with output for better debugging --- Installer-with-debug | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Installer-with-debug diff --git a/Installer-with-debug b/Installer-with-debug new file mode 100644 index 0000000..d1a4537 --- /dev/null +++ b/Installer-with-debug @@ -0,0 +1,50 @@ +#!/bin/sh +echo -e "\e[1;36m"Running apt-get update and apt-get dist-upgrade for you..."\e[0m" +sudo apt-get update && sudo apt-get dist-upgrade -y +echo -e "\e[1;36m"System successfully updated and upgraded!"\e[0m" + +echo -e "\e[1;36m"Installing a few packages that are missing on Raspbian Stretch Lite..."\e[0m" +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 + +echo -e "\e[1;36m"Cleaning a bit of mess to free up some space..."\e[0m" +sudo apt-get clean && sudo apt-get autoremove -y + +echo -e "\e[1;36m"Installing the E-Paper-Calendar Software"\e[0m" +git clone https://github.com/aceisace/Raspberry-Pi-Google-Calendar-with-E-Paper-display +mkdir E-Paper-Master +cd Raspberry-Pi-Google-Calendar-with-E-Paper-display +cp -r Calendar /home/pi/E-Paper-Master/ +cp README.md /home/pi/E-Paper-Master/ +cp LICENSE /home/pi/E-Paper-Master/ +cp -r .git /home/pi/E-Paper-Master/ +cd +rm -r Raspberry-Pi-Google-Calendar-with-E-Paper-display + +echo -e "\e[1;36m"Installing a few required packages for the E-Paper Software"\e[0m" +sudo pip3 install pyowm +sudo pip3 install ics +pip3 install pyowm +pip3 install ics + +echo -e "\e[1;36m"Setting up the script to start at boot..."\e[0m" +sudo apt-get install supervisor -y + +sudo bash -c 'cat > /etc/supervisor/conf.d/E-Paper.conf' << EOF +[program:E-Paper] +command = sudo /usr/bin/python3.5 /home/pi/E-Paper-Master/Calendar/stable.py +stdout_logfile = /home/pi/E-Paper-Master/E-Paper.log +stderr_logfile = /home/pi/E-Paper-Master/E-Paper-err.log +EOF + +sudo service supervisor start E-Paper + +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" +echo -e "\e[1;31m"Do not forget to add your iCal url and openweathermap API in the main script."\e[0m"