Skip to content

Commit

Permalink
Updating install and update scripts and setting default config file
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewMohawk committed Mar 30, 2021
1 parent 648f614 commit 11b33df
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 7 deletions.
14 changes: 7 additions & 7 deletions config.ini.bak
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ enabled = True
[WEBSERVER]
enabled = True
listen_host = 0.0.0.0
server_port = 8080
server_port = 80

[EXTENSIONS]
directory = extensions
Expand All @@ -27,12 +27,12 @@ HDMI_CONTRAST = 130
HDMI_HUE = 0

[AURORA]
AURORA_PIXELCOUNT_TOTAL = 270
AURORA_PIXELCOUNT_LEFT = 49
AURORA_PIXELCOUNT_RIGHT = 49
AURORA_PIXELCOUNT_TOP = 86
AURORA_PIXELCOUNT_BOTTOM = 86
AURORA_GAMMA = 5.0
AURORA_PIXELCOUNT_TOTAL = 200
AURORA_PIXELCOUNT_LEFT = 50
AURORA_PIXELCOUNT_RIGHT = 50
AURORA_PIXELCOUNT_TOP = 50
AURORA_PIXELCOUNT_BOTTOM = 50
AURORA_GAMMA = 2.0
AURORA_DEBUG = false


Expand Down
57 changes: 57 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
echo -e "
▄▄▄ █ ██ ██▀███ ▒█████ ██▀███ ▄▄▄
▒████▄ ██ ▓██▒▓██ ▒ ██▒▒██▒ ██▒▓██ ▒ ██▒▒████▄
▒██ ▀█▄ ▓██ ▒██░▓██ ░▄█ ▒▒██░ ██▒▓██ ░▄█ ▒▒██ ▀█▄
░██▄▄▄▄██ ▓▓█ ░██░▒██▀▀█▄ ▒██ ██░▒██▀▀█▄ ░██▄▄▄▄██
▓█ ▓██▒▒▒█████▓ ░██▓ ▒██▒░ ████▓▒░░██▓ ▒██▒ ▓█ ▓██▒
▒▒ ▓▒█░░▒▓▒ ▒ ▒ ░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░ ▒▓ ░▒▓░ ▒▒ ▓▒█░
▒ ▒▒ ░░░▒░ ░ ░ ░▒ ░ ▒░ ░ ▒ ▒░ ░▒ ░ ▒░ ▒ ▒▒ ░
░ ▒ ░░░ ░ ░ ░░ ░ ░ ░ ░ ▒ ░░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░
-Install Script-
@AndrewMohawk
"
INSTALLDIR="/opt/Aurora"
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root, please use sudo"
exit 1
fi

if [ -d "$INSTALLDIR" ]
then
echo "Directory $INSTALLDIR exists. Please remove before performing a clean install"
exit 1
fi
echo "[+] Creating Install Directory"
echo "------------------------------"
mkdir $INSTALLDIR
cd $INSTALLDIR
echo "[+] Updating APT and installing dependencies"
echo "------------------------------"
apt update
apt-get install -y libatlas-base-dev libportaudio2 python3-pip git python3-opencv
echo "[+] Git Cloning Aurora base"
echo "------------------------------"
git clone https://github.com/AndrewMohawk/Aurora.git .
cp config.ini.bak config.ini
echo "[+] Installing Python Requirements"
echo "------------------------------"
pip3 install -r requirements.txt
echo "[+] Installing Service"
echo "------------------------------"
cp aurora.service /etc/systemd/system
systemctl start aurora.service
echo "[+] Service Status"
echo "------------------------------"
echo "Aurora status: `systemctl is-active aurora.service`"
echo "[+] Last 20 lines of syslog"
echo "------------------------------"
sudo tail -n 20 /var/log/syslog
echo -e "
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
(___|___|___|___|___|___|___|___|___|___|___|___)
"
echo "Complete. You can now browse to the web interface to configure any changes you may need."
localip=$(hostname -I)
echo "This will likely be: http://$localip/"
56 changes: 56 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash
echo -e "
▄▄▄ █ ██ ██▀███ ▒█████ ██▀███ ▄▄▄
▒████▄ ██ ▓██▒▓██ ▒ ██▒▒██▒ ██▒▓██ ▒ ██▒▒████▄
▒██ ▀█▄ ▓██ ▒██░▓██ ░▄█ ▒▒██░ ██▒▓██ ░▄█ ▒▒██ ▀█▄
░██▄▄▄▄██ ▓▓█ ░██░▒██▀▀█▄ ▒██ ██░▒██▀▀█▄ ░██▄▄▄▄██
▓█ ▓██▒▒▒█████▓ ░██▓ ▒██▒░ ████▓▒░░██▓ ▒██▒ ▓█ ▓██▒
▒▒ ▓▒█░░▒▓▒ ▒ ▒ ░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░ ▒▓ ░▒▓░ ▒▒ ▓▒█░
▒ ▒▒ ░░░▒░ ░ ░ ░▒ ░ ▒░ ░ ▒ ▒░ ░▒ ░ ▒░ ▒ ▒▒ ░
░ ▒ ░░░ ░ ░ ░░ ░ ░ ░ ░ ▒ ░░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░
-Update Script-
@AndrewMohawk
"
INSTALLDIR = "/opt/Aurora"
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root, please use sudo"
exit 1
fi

if [ !-d "$INSTALLDIR" ]
then
echo "Directory $INSTALLDIR Does not exist. Please run install first or update the install directory"
exit 1
fi
cd $INSTALLDIR
if [ -d .git ]; then
echo "[+] Git Cloning Aurora base"
echo "------------------------------"
git pull
echo "[+] Stopping Aurora"
echo "------------------------------"
service aurora stop
echo "[+] Service Status"
echo "------------------------------"
echo "Aurora status: `systemctl is-active aurora.service`"
echo "[+] Starting Aurora"
echo "------------------------------"
service aurora start
echo "[+] Service Status"
echo "------------------------------"
echo "Aurora status: `systemctl is-active aurora.service`"
echo "[+] Last 20 lines of syslog"
echo "------------------------------"
sudo tail -n 20 /var/log/syslog
echo -e "
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
(___|___|___|___|___|___|___|___|___|___|___|___)
"
echo "Complete. You can now browse to the web interface to configure any changes you may need."
localip=$(hostname -I)
echo "This will likely be: http://$localip/"

else
echo "This install directory ($INSTALLDIR) is *NOT* a git repo."
fi;

0 comments on commit 11b33df

Please sign in to comment.