#!/bin/sh if [ -f "/var/www/html/tgcount.php" ]; then sudo systemctl stop apache2 #echo "found file" else echo "file not found" fi if [ -f "/var/www/html/tgcount.php" ]; then sudo systemctl disable apache2 #echo "found file" else echo "file not found" fi if [ -f "/var/www/html/tgcount.php" ]; then sudo rm /var/www/html/* -r #echo "found file" else echo "file not found" fi if [ -d "/var/www/fdmr" ]; then sudo rm /var/www/fdmr/ -r #echo "found file" else echo "file not found" fi sudo systemctl stop fdmr_mon.service sudo systemctl stop proxy.service sudo systemctl stop http.server-fdmr.service sudo rm -r /opt/FDMR-Monitor/ # cd /opt sudo git clone https://github.com/yuvelq/FDMR-Monitor.git cd FDMR-Monitor sudo git checkout Self_Service sudo chmod +x install.sh sudo sed -i 's/RELOAD_TIME = 15/RELOAD_TIME = 1/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg #sudo cp utils/logrotate/fdmr_mon /etc/logrotate.d/ rm /etc/logrotate.d/fdmr_mon rm /lib/systemd/system/fdmr_mon.service #sudo cp utils/systemd/fdmr_mon.service /lib/systemd/system/ sudo sed -i 's/FREQUENCY = 10/FREQUENCY = 120/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg sudo chmod 644 /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg sed '33 a ' -i /opt/FDMR-Monitor/html/sysinfo.php #### sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/html/*.* sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.* #### sudo sed -i 's/localhost_2-day.png/localhost_1-day.png/' /opt/FDMR-Monitor/html/sysinfo.php 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 chmod +x /opt/FDMR-Monitor/updateTGIDS.sh # sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF" Home