merge-requests/1/head
Esteban Mackay Q 2 years ago
parent 06ae3f1d42
commit 3bb807e24f

@ -762,6 +762,11 @@ sed -i "s/THEME_COLOR = .*/THEME_COLOR = pro/g" /opt/FDMR-Monitor/fdmr-mon.cfg
#sed -i "s/SUBSCRIBER_URL = .*/SUBSCRIBER_URL = https:\/\/freedmr-lh.gb7fr.org.uk\/json\/subscriber_ids.json/g" /opt/FDMR-Monitor/fdmr-mon.cfg
#sed -i "s/TGID_URL = .*/TGID_URL = https:\/\/freedmr.cymru\/talkgroups\/talkgroup_ids_json.php/g" /opt/FDMR-Monitor/fdmr-mon.cfg
if [ -f "mon.db" ]
then
rm mon.db
fi
python3 mon_db.py --create
python3 mon_db.py --update
@ -951,8 +956,14 @@ sed -i "s/ExecStart=.*/ExecStart=python3 \/opt\/FDMR-Monitor2\/monitor.py/g" /op
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
sudo python3 mon_db.py
#sudo rm mon.db
if [ -f "mon.db" ]
then
rm mon.db
fi
python3 mon_db.py --create
python3 mon_db.py --update
cat > /lib/systemd/system/http.server-fdmr2.service <<- "EOF"
[Unit]

@ -870,6 +870,18 @@ sudo sed -i "s/THEME_COLOR = .*/THEME_COLOR = pro/g" /opt/FDMR-Monitor/fdmr-mon.
#sudo sed -i "s/SUBSCRIBER_URL = .*/SUBSCRIBER_URL = https:\/\/freedmr-lh.gb7fr.org.uk\/json\/subscriber_ids.json/g" /opt/FDMR-Monitor/fdmr-mon.cfg
#sudo sed -i "s/TGID_URL = .*/TGID_URL = https:\/\/freedmr.cymru\/talkgroups\/talkgroup_ids_json.php/g" /opt/FDMR-Monitor/fdmr-mon.cfg
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;"
if [ -f "mon.db" ]
then
rm mon.db
fi
python3 mon_db.py --create
python3 mon_db.py --update
@ -1020,8 +1032,21 @@ sed -i "s/ExecStart=.*/ExecStart=python3 \/opt\/FDMR-Monitor2\/monitor.py/g" /op
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
sudo python3 mon_db.py
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
cat > /lib/systemd/system/http.server-fdmr2.service <<- "EOF"
[Unit]
@ -1053,7 +1078,6 @@ then sudo systemctl disable http.server-fdmr.service
fi
if ! systemctl status http.server-fdmr2.service | grep "service; enabled;" >/dev/null 2>&1; then
sudo systemctl enable http.server-fdmr2.service
fi
if systemctl status fdmr_mon.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl disable fdmr_mon.service

Loading…
Cancel
Save

Powered by TurnKey Linux.