Update update.sh

merge-requests/1/head
Esteban Mackay Q 2 years ago
parent 926b88f036
commit ee2ec64fa6

@ -1,7 +1,4 @@
#!/bin/bash #!/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 then
echo "found file" echo "found file"
else 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) variable4=$(grep "COLOR_1 =" /opt/FDMR-Monitor/fdmr-mon.cfg)
variable5=$(grep "COLOR_2 =" /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 if systemctl status http.server-fdmr2.service |grep active >/dev/null 2>&1
then systemctl stop http.server-fdmr2.service then systemctl stop http.server-fdmr2.service
@ -936,13 +937,18 @@ then
systemctl start http.server-fdmr.service systemctl start http.server-fdmr.service
sh /opt/extra-2.sh sh /opt/extra-2.sh
fi 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 EOFB1
######################################### FDMR-Monitor2 Update ############################################################### ######################################### FDMR-Monitor2 Update ###############################################################
sudo cat > /opt/monitor-update2.sh <<- "EOFB2" sudo cat > /opt/monitor-update2.sh <<- "EOFB2"
#!/bin/bash #!/bin/bash
if systemctl status http.server-fdmr.service |grep active >/dev/null 2>&1 if systemctl status http.server-fdmr.service |grep active >/dev/null 2>&1
then systemctl stop http.server-fdmr.service 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 '*/5 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/graph.sh' remove &&
cronedit.sh '*/2 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/cpu.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 '*/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 EOFB2
###################################################################################################################### ######################################################################################################################
# Cronedit # Cronedit

Loading…
Cancel
Save

Powered by TurnKey Linux.