diff --git a/menu/menu-fdmr b/menu/menu-fdmr index 880f3e9..cfbe2cd 100644 --- a/menu/menu-fdmr +++ b/menu/menu-fdmr @@ -235,11 +235,6 @@ 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 freedmr.service |grep disable >/dev/null 2>&1 -then - sudo systemctl stop mariadb.service - sudo systemctl disable mariadb.service -fi sudo systemctl stop fdmr_mon2.service sudo systemctl disable fdmr_mon2.service sudo systemctl stop http.server-fdmr2.service @@ -247,7 +242,33 @@ sudo systemctl disable http.server-fdmr2.service sudo systemctl stop fdmr_mon.service sudo systemctl disable fdmr_mon.service sudo systemctl stop http.server-fdmr.service -sudo systemctl disable http.server-fdmr.service;; +sudo systemctl disable http.server-fdmr.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 +;; 11) menu-igate ;; 12)