diff --git a/menu/menu-fdmr b/menu/menu-fdmr index cfbe2cd..44a89fe 100644 --- a/menu/menu-fdmr +++ b/menu/menu-fdmr @@ -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 &&