From d09b91e3690f640ea0804b48f24d0b3cc79a66e8 Mon Sep 17 00:00:00 2001
From: David Trattnig <david.trattnig@o94.at>
Date: Wed, 1 Apr 2020 21:26:50 +0200
Subject: [PATCH] Simplified installation.

---
 install.sh | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/install.sh b/install.sh
index 6d0ebad..fbbf9a4 100755
--- a/install.sh
+++ b/install.sh
@@ -15,8 +15,14 @@ if [ $mode == "prod" ]; then
     echo "[Installing AURA ENGINE for Production]"
 fi
 
+echo "Installation System Packages ..."
+./script/install-system-packages.sh
 
-# Production 
+echo "Installation OPAM Packages ..."
+./script/install-opam-packages.sh
+
+
+# Development 
 
 if [ $mode == "dev" ]; then
 
@@ -62,7 +68,29 @@ echo "Create local Logs Folder ..."
 mkdir -p logs
 
 echo "Installing Web Application Packages ..."
-./install-web.sh
+./script/install-web.sh
 
 echo "Installing Python Requirements ..."
-python3.7 $(which pip3) install -r requirements.txt
\ No newline at end of file
+python3.7 $(which pip3) install -r requirements.txt
+
+echo "Setting up database ..."
+echo 
+echo "Which database system do you want to use? (Press '1' or '2')"
+echo "  [1] MariaDB"
+echo "  [2] Other / Manually"
+echo
+
+while true; do
+read -rsn1 input
+if [ "$input" = "1" ]; then
+    echo "Creating DB for MariaDB ..."
+    LOCKFILE_DB=/etc/aura/engine/.install.mariadb.lock
+    sudo sh ./script/init-db-mariadb.sh
+fi
+if [ "$input" = "2" ]; then
+    echo "Manual database setup selected."
+fi
+done
+
+echo 
+echo "+++ Installation of AURA Engine finished! +++"
\ No newline at end of file
-- 
GitLab