From afa82cb3d93469092e329214767f3b7a1740b382 Mon Sep 17 00:00:00 2001 From: Oscar Alvarez Date: Tue, 4 Aug 2020 12:05:16 -0500 Subject: [PATCH] Fix install predash --- install_predash.sh | 59 ------------------------------------- install_server_version_5.sh | 11 +++---- predash_web.service | 2 +- 3 files changed, 7 insertions(+), 65 deletions(-) delete mode 100644 install_predash.sh diff --git a/install_predash.sh b/install_predash.sh deleted file mode 100644 index 05264f7..0000000 --- a/install_predash.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh - -#--------------------------------------------------------- -# Script Install Pedash -# -------------------------------------------------------- - -# Install apt-get packages - -echo "[INFO] Installing main apt packages..." -#sudo apt-get update -#sudo apt-get -y upgrade - -sudo apt -y install build-essential -sudo apt -y install python3-dev - -echo "[INFO] Done." - -echo "[INFO] Installing pip packages..." - -sudo pip3 install simplejson -sudo pip3 install pycrypto -sudo pip3 install flask -sudo pip3 install flask_tryton -sudo pip3 install flask_cors - - -message "[INFO] Installing Predash WEB..." ${BLUE} -mkdir $HOME/.flask -mkdir $HOME/predash - -cd $HOME/predash -hg clone https://bitbucket.org/presik/predash_web -cd predash_web && npm install && cd .. - -echo "[INFO] Done." - -message "[INFO] Installing Predash API..." ${BLUE} -hg clone https://bitbucket.org/presik/predash_api -cd predash_api && npm install && cd .. - - -echo "[INFO] Creating Config File..." - -env_flask=" -[General] -databases=['DEMO50'] -host=0.0.0.0 -trytond_config=/home/psk/.trytond/trytond.conf - -[Auth] -api_key=xxxxxxxxxxxxxx -secret_key=xxxxxxxxxx -user=username -" - -echo $env_flask >> $HOME/.flask/dash.ini - - -echo "[INFO] Done." diff --git a/install_server_version_5.sh b/install_server_version_5.sh index b55c240..f3c5af6 100644 --- a/install_server_version_5.sh +++ b/install_server_version_5.sh @@ -161,16 +161,17 @@ mkdir $HOME_USER/.flask mkdir $HOME_USER/.certificate mkdir $HOME_USER/predash -hg clone https://hg@bitbucket.org/presik/predash_api +cd predash +git clone git@bitbucket.org:presik/predash-api.git -cp predash_api/dash.ini ~/.flask/dash.ini -sudo cp predash_api/predash_api.service /etc/systemd/system/predash_api.service +cp predash-api/dash.ini ~/.flask/dash.ini +sudo cp predash-api/predash_api.service /etc/systemd/system/predash_api.service sudo chmod 755 /etc/systemd/system/predash_api.service - sudo systemctl enable predash_api.service -hg clone https://hg@bitbucket.org/presik/predash_web +git clone git@bitbucket.org:presik/predash-web.git +cd predash-web sudo cp predash_web.service /etc/systemd/system/predash_web.service sudo chmod 755 /etc/systemd/system/predash_web.service diff --git a/predash_web.service b/predash_web.service index c12312b..279364c 100644 --- a/predash_web.service +++ b/predash_web.service @@ -8,7 +8,7 @@ User=psk Group=psk ExecStart=/home/psk/predash/run_predash.sh ExecStop= -Environment="REACT_APP_TRYTON_API_HOST=cloud2.presik.com" +Environment="REACT_APP_TRYTON_API_HOST=cloudX.presik.com" Environment="REACT_APP_TRYTON_API_PORT=5000" [Install]