|
|
|
@ -451,9 +451,11 @@ then
|
|
|
|
mkdir -p /var/log/FreeDMR
|
|
|
|
mkdir -p /var/log/FreeDMR
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
chmod +x /opt/FreeDMR/install.sh
|
|
|
|
chmod +x /opt/FreeDMR/install.sh
|
|
|
|
|
|
|
|
apt-get install python3-venv -y
|
|
|
|
|
|
|
|
python3 -m venv env0 &&
|
|
|
|
|
|
|
|
source env0/bin/activate &&
|
|
|
|
./install.sh
|
|
|
|
./install.sh
|
|
|
|
|
|
|
|
deactivate
|
|
|
|
#
|
|
|
|
#
|
|
|
|
if [ "$(cat /opt/FreeDMR/FreeDMR-SAMPLE.cfg | grep 'TOPO_FILE')" != "" ]; then
|
|
|
|
if [ "$(cat /opt/FreeDMR/FreeDMR-SAMPLE.cfg | grep 'TOPO_FILE')" != "" ]; then
|
|
|
|
sudo sed -i 's/TOPO_FILE:.*/TOPO_FILE: topography.json/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
|
|
|
sudo sed -i 's/TOPO_FILE:.*/TOPO_FILE: topography.json/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
|
|
|
@ -675,8 +677,11 @@ 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
|
|
|
|
|
|
|
|
apt-get install python3-venv -y
|
|
|
|
|
|
|
|
python3 -m venv env0 &&
|
|
|
|
|
|
|
|
source env0/bin/activate &&
|
|
|
|
pip3 install -r requirements.txt
|
|
|
|
pip3 install -r requirements.txt
|
|
|
|
|
|
|
|
deactivate
|
|
|
|
pip install pyopenssl --upgrade
|
|
|
|
pip install pyopenssl --upgrade
|
|
|
|
cd /opt/FDMR-Monitor/
|
|
|
|
cd /opt/FDMR-Monitor/
|
|
|
|
cp /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg /opt/FDMR-Monitor/fdmr-mon.cfg
|
|
|
|
cp /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg /opt/FDMR-Monitor/fdmr-mon.cfg
|
|
|
|
@ -1003,6 +1008,8 @@ 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;" &&
|
|
|
|
@ -1010,8 +1017,9 @@ mysql -u root -e "DROP TABLE IF EXISTS hbmon.subscriber_ids;" &&
|
|
|
|
mysql -u root -e "DROP TABLE IF EXISTS hbmon.talkgroup_ids;" &&
|
|
|
|
mysql -u root -e "DROP TABLE IF EXISTS hbmon.talkgroup_ids;" &&
|
|
|
|
mysql -u root -e "DROP TABLE IF EXISTS hbmon.tg_count;"
|
|
|
|
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
|
|
|
|
@ -1191,9 +1199,11 @@ 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
|
|
|
|
|
|
|
|
apt-get install python3-venv -y
|
|
|
|
|
|
|
|
python3 -m venv env0 &&
|
|
|
|
|
|
|
|
source env0/bin/activate &&
|
|
|
|
pip3 install -r requirements.txt
|
|
|
|
pip3 install -r requirements.txt
|
|
|
|
|
|
|
|
deactivate
|
|
|
|
pip install pyopenssl --upgrade
|
|
|
|
pip install pyopenssl --upgrade
|
|
|
|
chmod 777 /opt/FDMR-Monitor2/data
|
|
|
|
chmod 777 /opt/FDMR-Monitor2/data
|
|
|
|
|
|
|
|
|
|
|
|
@ -1273,6 +1283,8 @@ 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;" &&
|
|
|
|
@ -1280,9 +1292,9 @@ mysql -u root -e "DROP TABLE IF EXISTS hbmon.subscriber_ids;" &&
|
|
|
|
mysql -u root -e "DROP TABLE IF EXISTS hbmon.talkgroup_ids;" &&
|
|
|
|
mysql -u root -e "DROP TABLE IF EXISTS hbmon.talkgroup_ids;" &&
|
|
|
|
mysql -u root -e "DROP TABLE IF EXISTS hbmon.tg_count;"
|
|
|
|
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
|
|
|
|
#####################################
|
|
|
|
#####################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|