diff --git a/install.sh b/install.sh index 86f1082..423c30b 100644 --- a/install.sh +++ b/install.sh @@ -916,8 +916,10 @@ chmod 755 /opt/FDMR-Monitor2/data sed -i "s/LANGUAGE =.*/LANGUAGE = \"es\"/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/root/emqte1/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/test/selfcare/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg +sed -i "s/TELEGRAM/#TELEGRAM/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg +sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/config.php sed -i "s/PRIVATE_NETWORK = True/PRIVATE_NETWORK = False/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg -sed -i "s/with.*/with FDMR-Monitor2<\/a> by CS8ABG<\/a> , Proyect: FDMR+<\/a><\/div>/g" /opt/FDMR-Monitor2/html/include/footer.php +sed -i "s/with.*/with FDMR-Monitor2<\/a> by CS8ABG<\/a> , Proyect: FDMR+<\/a>/g" /opt/FDMR-Monitor2/html/include/footer.php sed -i "s/SUBSCRIBER_FILE =.*/SUBSCRIBER_FILE = subscriber_ids.csv/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/FILES_PATH =.*/FILES_PATH = \/opt\/FDMR-Monitor2\/data/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/#fff/#d1d1d1/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlte.min.css @@ -947,11 +949,26 @@ sudo cp /opt/FDMR-Monitor2/utils/logrotate/fdmr_mon2 /etc/logrotate.d/fdmr_mon2 sudo cp /opt/FDMR-Monitor2/utils/systemd/fdmr_mon2.service /lib/systemd/system/fdmr_mon2.service #sudo rm mon.db +if systemctl status mariadb.service |grep inactive >/dev/null 2>&1 +then sudo systemctl start mariadb.service + +fi +if systemctl status mariadb.service |grep disable >/dev/null 2>&1 +then sudo systemctl enable mariadb.service + +fi if [ -f "mon.db" ] then rm mon.db fi +mysql -u "root" "selfcare" -e "DROP TABLE IF EXISTS last_heard;" +mysql -u "root" "selfcare" -e "DROP TABLE IF EXISTS lstheard_log;" +mysql -u "root" "selfcare" -e "DROP TABLE IF EXISTS peer_ids;" +mysql -u "root" "selfcare" -e "DROP TABLE IF EXISTS subscriber_ids;" +mysql -u "root" "selfcare" -e "DROP TABLE IF EXISTS talkgroup_ids;" +mysql -u "root" "selfcare" -e "DROP TABLE IF EXISTS tg_count;" + python3 mon_db.py --create python3 mon_db.py --update diff --git a/update.sh b/update.sh index e4d4f75..691329b 100644 --- a/update.sh +++ b/update.sh @@ -1060,13 +1060,14 @@ chmod 777 /opt/FDMR-Monitor2/data #sed -i '72d' /opt/FDMR-Monitor2/html/include/navbar.php #sed '69 a \ ' -i /opt/FDMR-Monitor2/html/include/navbar.php sed -i "s/LANGUAGE =.*/LANGUAGE = \"es\"/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg +sed -i "s/TELEGRAM/#TELEGRAM/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/root/emqte1/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/test/selfcare/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/PRIVATE_NETWORK = True/PRIVATE_NETWORK = False/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/SUBSCRIBER_FILE =.*/SUBSCRIBER_FILE = subscriber_ids.csv/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/FILES_PATH =.*/FILES_PATH = \/opt\/FDMR-Monitor2\/data/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/config.php -sed -i "s/with.*/with FDMR-Monitor2<\/a> by CS8ABG<\/a> , Proyect: FDMR+<\/a><\/div>/g" /opt/FDMR-Monitor2/html/include/footer.php +sed -i "s/with.*/with FDMR-Monitor2<\/a> by CS8ABG<\/a> , Proyect: FDMR+<\/a>/g" /opt/FDMR-Monitor2/html/include/footer.php sed -i "s/#fff/#d1d1d1/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlte.min.css sed -i "s/f8f9fa/d0d0d0/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlte.min.css sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/ssconfunc.php