Update update.sh

merge-requests/1/head
Esteban Mackay Q 2 years ago
parent 05c6486228
commit 10812d33a6

@ -690,8 +690,8 @@ sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.*
# Install the required support programs # Install the required support programs
sudo -H pip3 install --upgrade pip sudo -H pip3 install --upgrade pip
python3 -m venv env0 && python3 -m venv env0
source env0/bin/activate && source env0/bin/activate
pip3 install -r requirements.txt pip3 install -r requirements.txt
deactivate deactivate
pip install pyopenssl --upgrade pip install pyopenssl --upgrade
@ -1020,8 +1020,7 @@ if [ -f "mon.db" ]
then then
rm mon.db rm mon.db
fi fi
python3 -m venv env0 &&
source env0/bin/activate &&
mysql -u root -e "DROP TABLE IF EXISTS hbmon.last_heard;" && mysql -u root -e "DROP TABLE IF EXISTS hbmon.last_heard;" &&
mysql -u root -e "DROP TABLE IF EXISTS hbmon.lstheard_log;" && mysql -u root -e "DROP TABLE IF EXISTS hbmon.lstheard_log;" &&
mysql -u root -e "DROP TABLE IF EXISTS hbmon.peer_ids;" && mysql -u root -e "DROP TABLE IF EXISTS hbmon.peer_ids;" &&
@ -1031,7 +1030,7 @@ mysql -u root -e "DROP TABLE IF EXISTS hbmon.tg_count;"
cd /opt/FDMR-Monitor cd /opt/FDMR-Monitor
python3 mon_db.py --create && python3 mon_db.py --create &&
python3 mon_db.py --update python3 mon_db.py --update
deactivate
systemctl stop apache2 systemctl stop apache2
systemctl disable apache2 systemctl disable apache2
@ -1225,8 +1224,8 @@ sudo git clone https://github.com/CS8ABG/FDMR-Monitor.git /opt/FDMR-Monitor2
cd /opt/FDMR-Monitor2 cd /opt/FDMR-Monitor2
sudo git checkout Self_Service sudo git checkout Self_Service
sudo -H pip3 install --upgrade pip sudo -H pip3 install --upgrade pip
python3 -m venv env0 && python3 -m venv env0
source env0/bin/activate && source env0/bin/activate
pip3 install -r requirements.txt pip3 install -r requirements.txt
deactivate deactivate
pip install pyopenssl --upgrade pip install pyopenssl --upgrade
@ -1308,8 +1307,7 @@ if [ -f "mon.db" ]
then then
rm mon.db rm mon.db
fi fi
python3 -m venv env0 &&
source env0/bin/activate &&
mysql -u root -e "DROP TABLE IF EXISTS hbmon.last_heard;" && mysql -u root -e "DROP TABLE IF EXISTS hbmon.last_heard;" &&
mysql -u root -e "DROP TABLE IF EXISTS hbmon.lstheard_log;" && mysql -u root -e "DROP TABLE IF EXISTS hbmon.lstheard_log;" &&
mysql -u root -e "DROP TABLE IF EXISTS hbmon.peer_ids;" && mysql -u root -e "DROP TABLE IF EXISTS hbmon.peer_ids;" &&
@ -1319,7 +1317,7 @@ mysql -u root -e "DROP TABLE IF EXISTS hbmon.tg_count;"
cd /opt/FDMR-Monitor2 cd /opt/FDMR-Monitor2
python3 mon_db.py --create && python3 mon_db.py --create &&
python3 mon_db.py --update python3 mon_db.py --update
deactivate
##################################### #####################################

Loading…
Cancel
Save

Powered by TurnKey Linux.