Update menu-fdmr

This commit is contained in:
Esteban Mackay Q 2023-07-28 07:24:42 -05:00
parent 1be3879164
commit 3b6e015e88
1 changed files with 27 additions and 6 deletions

View File

@ -99,17 +99,38 @@ sudo systemctl start freedmr.service
sudo systemctl start fdmrparrot.service
sudo systemctl start proxy.service ;;
7)
if systemctl status fdmr_mon.service |grep disable >/dev/null 2>&1
then
sudo systemctl stop mariadb.service
sudo systemctl disable mariadb.service
fi
sudo systemctl stop fdmrparrot.service
sudo systemctl disable fdmrparrot.service
sudo systemctl stop proxy.service
sudo systemctl disable proxy.service
sudo systemctl stop freedmr.service
sudo systemctl disable freedmr.service ;;
sudo systemctl disable freedmr.service
# Verificar el estado del servicio mariadb.service
if systemctl is-enabled mariadb.service | grep -q "disabled"; then
echo "El servicio mariadb está deshabilitado."
else
# Verificar el estado del servicio freedmr-fdmr.service
if systemctl is-enabled freedmr.service | grep -q "enabled"; then
echo "El servicio freedmr está habilitado."
else
# Verificar el estado del servicio http.server-fdmr.service
if systemctl is-enabled http.server-fdmr.service | grep -q "enabled"; then
echo "El servicio http.server-fdmr está habilitado."
else
# Verificar el estado del servicio http.server-fdmr2.service
if systemctl is-enabled http.server-fdmr2.service | grep -q "enabled"; then
echo "El servicio http.server-fdmr2 está habilitado."
else
# Si todo está bien, deshabilitar el servicio mariadb.service
systemctl disable mariadb.service
systemctl stop mariadb.service
echo "El servicio mariadb ha sido deshabilitado."
fi
fi
fi
fi
;;
8)
(crontab -l; echo "* */1 * * * sync ; echo 3 > /proc/sys/vm/drop_caches >/dev/null 2>&1")|awk '!x[$0]++'|crontab -
cronedit.sh '*/5 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/graph.sh' add &&