From abe2e969b37a53fbbda30af923da6493867970cc Mon Sep 17 00:00:00 2001 From: "Esteban Mackay Q." Date: Sun, 20 Apr 2025 23:14:26 -0500 Subject: [PATCH] Update update.sh --- update.sh | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/update.sh b/update.sh index 8c3776b..abbb1a4 100644 --- a/update.sh +++ b/update.sh @@ -784,9 +784,16 @@ if systemctl status fdmr_mon.service |grep "service; enabled;" >/dev/null 2>&1 then sudo systemctl stop fdmr_mon.service sudo systemctl start fdmr_mon.service + bash /opt/FDMR-Monitor/sysinfo/rrd-db.sh + sleep 1 + bash /opt/FDMR-Monitor/sysinfo/cpu.sh + sleep 1 + bash /opt/FDMR-Monitor/sysinfo/graph.sh + (crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/cpu.sh") | crontab - + (crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/graph.sh") | crontab - (crontab -l; echo "* */24 * * * rm /opt/FDMR-Monitor/data/*") | awk '!x[$0]++' | crontab - - (crontab -l; echo "*/2 * * * * sh /opt/FDMR-Monitor/sysinfo/cpu.sh") | awk '!x[$0]++' | crontab - - (crontab -l; echo "*/5 * * * * sh /opt/FDMR-Monitor/sysinfo/graph.sh") | awk '!x[$0]++' | crontab - + (crontab -l; echo "*/2 * * * * bash /opt/FDMR-Monitor/sysinfo/cpu.sh") | awk '!x[$0]++' | crontab - + (crontab -l; echo "*/5 * * * * bash /opt/FDMR-Monitor/sysinfo/graph.sh") | awk '!x[$0]++' | crontab - (crontab -l | grep -v "rm /opt/FDMR-Monitor2/data/*") | crontab - fi @@ -796,8 +803,8 @@ then sudo systemctl start fdmr_mon2.service (crontab -l; echo "* */24 * * * rm /opt/FDMR-Monitor2/data/*") | awk '!x[$0]++' | crontab - (crontab -l | grep -v "rm /opt/FDMR-Monitor/data/*") | crontab - - (crontab -l | grep -v "sh /opt/FDMR-Monitor/sysinfo/cpu.sh") | crontab - - (crontab -l | grep -v "sh /opt/FDMR-Monitor/sysinfo/graph.sh") | crontab - + (crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/cpu.sh") | crontab - + (crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/graph.sh") | crontab - fi ############## @@ -1037,9 +1044,16 @@ if systemctl status fdmr_mon.service |grep "service; enabled;" >/dev/null 2>&1 then sudo systemctl stop fdmr_mon.service sudo systemctl start fdmr_mon.service + bash /opt/FDMR-Monitor/sysinfo/rrd-db.sh + sleep 1 + bash /opt/FDMR-Monitor/sysinfo/cpu.sh + sleep 1 + bash /opt/FDMR-Monitor/sysinfo/graph.sh + (crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/cpu.sh") | crontab - + (crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/graph.sh") | crontab - (crontab -l; echo "* */24 * * * rm /opt/FDMR-Monitor/data/*") | awk '!x[$0]++' | crontab - - (crontab -l; echo "*/2 * * * * sh /opt/FDMR-Monitor/sysinfo/cpu.sh") | awk '!x[$0]++' | crontab - - (crontab -l; echo "*/5 * * * * sh /opt/FDMR-Monitor/sysinfo/graph.sh") | awk '!x[$0]++' | crontab - + (crontab -l; echo "*/2 * * * * bash /opt/FDMR-Monitor/sysinfo/cpu.sh") | awk '!x[$0]++' | crontab - + (crontab -l; echo "*/5 * * * * bash /opt/FDMR-Monitor/sysinfo/graph.sh") | awk '!x[$0]++' | crontab - (crontab -l | grep -v "rm /opt/FDMR-Monitor2/data/*") | crontab - fi @@ -1049,8 +1063,8 @@ then sudo systemctl start fdmr_mon2.service (crontab -l; echo "* */24 * * * rm /opt/FDMR-Monitor2/data/*") | awk '!x[$0]++' | crontab - (crontab -l | grep -v "rm /opt/FDMR-Monitor/data/*") | crontab - - (crontab -l | grep -v "sh /opt/FDMR-Monitor/sysinfo/cpu.sh") | crontab - - (crontab -l | grep -v "sh /opt/FDMR-Monitor/sysinfo/graph.sh") | crontab - + (crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/cpu.sh") | crontab - + (crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/graph.sh") | crontab - fi sh /opt/extra-3.sh