#!/bin/sh sudo systemctl stop apache2 sudo systemctl disable apache2 sudo systemctl stop fdmr_mon.service sudo systemctl stop http.server-fmr.service rm -r /opt/FDMR-Monitor/ cd /opt #sudo git clone https://github.com/yuvelq/FDMR-Monitor.git sudo git clone https://github.com/hp3icc/FDMR-Monitor.git cd FDMR-Monitor #git checkout Self_service_dev sudo chmod +x install.sh sudo ./install.sh sudo cp fdmr-mon_SAMPLE.cfg fdmr-mon.cfg sudo sed -i 's/RELOAD_TIME = 15/RELOAD_TIME = 1/' /opt/FDMR-Monitor/fdmr-mon.cfg sudo chmod 644 fdmr-mon.cfg sudo cp utils/logrotate/fdmr_mon /etc/logrotate.d/ sudo cp utils/systemd/fdmr_mon.service /lib/systemd/system/ #sudo sed -i 's/FREQUENCY = 10/FREQUENCY = 60/' /opt/FDMR-Monitor/fdmr-mon.cfg # sed '30 a ' -i /opt/FDMR-Monitor/html/sysinfo.php #### sudo sed -i 's/localhost_2-day.png/localhost_1-day.png/' /opt/FDMR-Monitor/html/sysinfo.php cd /opt/FDMR-Monitor/sysinfo/ sudo sed -i 's/var\/www\/html/opt\/FDMR-Monitor\/html/' cpu.sh sudo sed -i 's/var\/www\/html/opt\/FDMR-Monitor\/html/' graph.sh sudo sed -i "s/HBMonv2/FDMR-Monitor/g" /opt/FDMR-Monitor/sysinfo/*.sh sudo chmod +x /opt/FDMR-Monitor/sysinfo/cpu.sh sudo chmod +x /opt/FDMR-Monitor/sysinfo/graph.sh sudo chmod +x /opt/FDMR-Monitor/sysinfo/rrd-db.sh sudo sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh sudo chmod +x /opt/FDMR-Monitor/updateTGIDS.sh # sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF" Home
EOF # sudo rm /opt/FreeDMR/hotspot_proxy_v2.py sudo rm /opt/FreeDMR/proxy_db.* cd /opt/FreeDMR/ wget https://gitlab.hacknix.net/hacknix/FreeDMR/-/raw/master/hotspot_proxy_v2.py sudo sed -i "s/54100/54060/g" /opt/FreeDMR/hotspot_proxy_v2.py chmod +x hotspot_proxy_v2.py # sudo rm /opt/FDMR-Monitor/*.json sudo systemctl daemon-reload sudo rm /opt/FDMR-Monitor/sysinfo/*.rrd sudo sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh sudo systemctl start http.server-fmr.service sudo systemctl enable http.server-fmr.service sudo chmod +x /opt/extra-2.sh sudo sh /opt/extra-2.sh sudo rm mon.db sudo python3 mon_db.py sudo systemctl restart fdmr_mon.service sudo systemctl restart proxy.service