diff --git a/update.sh b/update.sh index f8ed674..55ba68f 100644 --- a/update.sh +++ b/update.sh @@ -1,7 +1,4 @@ #!/bin/bash -cronedit.sh '*/5 * * * *' 'sh /etc/freedmr/hbmon/sysinfo/graph.sh' remove -cronedit.sh '*/2 * * * *' 'sh /etc/freedmr/hbmon/sysinfo/cpu.sh' remove -if [ -f "/opt/wdp" ] then echo "found file" else @@ -452,6 +449,10 @@ variable3=$(grep "COLOR_TEXT =" /opt/FDMR-Monitor/fdmr-mon.cfg) variable4=$(grep "COLOR_1 =" /opt/FDMR-Monitor/fdmr-mon.cfg) variable5=$(grep "COLOR_2 =" /opt/FDMR-Monitor/fdmr-mon.cfg) +cronedit.sh '*/5 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/graph.sh' remove +cronedit.sh '*/2 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/cpu.sh' remove +cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor/data/*' remove +cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor2/data/*' remove ##################################### if systemctl status http.server-fdmr2.service |grep active >/dev/null 2>&1 then systemctl stop http.server-fdmr2.service @@ -936,13 +937,18 @@ then systemctl start http.server-fdmr.service sh /opt/extra-2.sh fi - +cronedit.sh '*/5 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/graph.sh' add && +cronedit.sh '*/2 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/cpu.sh' add && +cronedit.sh '*/5 * * * *' 'sh /etc/freedmr/hbmon/sysinfo/graph.sh' remove && +cronedit.sh '*/2 * * * *' 'sh /etc/freedmr/hbmon/sysinfo/cpu.sh' remove && +cronedit.sh '* */24 * * *' 'rm /etc/freedmr/hbmon/data/*' remove && +cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor/data/*' add && +cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor2/data/*' remove EOFB1 ######################################### FDMR-Monitor2 Update ############################################################### sudo cat > /opt/monitor-update2.sh <<- "EOFB2" #!/bin/bash - if systemctl status http.server-fdmr.service |grep active >/dev/null 2>&1 then systemctl stop http.server-fdmr.service @@ -1104,7 +1110,10 @@ fi cronedit.sh '*/5 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/graph.sh' remove && cronedit.sh '*/2 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/cpu.sh' remove && cronedit.sh '*/5 * * * *' 'sh /etc/freedmr/hbmon/sysinfo/graph.sh' remove && -cronedit.sh '*/2 * * * *' 'sh /etc/freedmr/hbmon/sysinfo/cpu.sh' remove +cronedit.sh '*/2 * * * *' 'sh /etc/freedmr/hbmon/sysinfo/cpu.sh' remove && +cronedit.sh '* */24 * * *' 'rm /etc/freedmr/hbmon/data/*' remove && +cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor/data/*' remove && +cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor2/data/*' add EOFB2 ###################################################################################################################### # Cronedit