From c54962da7648e1fef0e09726f671431239777732 Mon Sep 17 00:00:00 2001 From: hp3icc Date: Thu, 9 Oct 2025 22:31:28 -0500 Subject: [PATCH] 3dash --- easy-fdmr.sh | 54 +++++++++++++++++++++++++++++++++++++++++++++------- install.sh | 15 +++++++++++++++ update.sh | 8 ++++---- 3 files changed, 66 insertions(+), 11 deletions(-) diff --git a/easy-fdmr.sh b/easy-fdmr.sh index 1e43523..2fd83e3 100644 --- a/easy-fdmr.sh +++ b/easy-fdmr.sh @@ -125,10 +125,50 @@ sudo timedatectl set-timezone America/Panama bash -c "$(curl -fsSLk https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/rpiswap.sh)" && bash -c "$(curl -fsSLk https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/nginx.sh)" && bash -c "$(curl -fsSLk https://gitlab.com/hp3icc/fdmr/-/raw/main/install.sh)" -sudo systemctl start adn-server.service -sudo systemctl enable adn-server.service -sudo systemctl start proxy.service -sudo systemctl enable proxy.service -sudo systemctl start adn-parrot.service -sudo systemctl enable adn-parrot.service -menu-adn \ No newline at end of file + +(crontab -l | grep -v "rm /opt/FDMR-Monitor2/data/*") | crontab - +(crontab -l | grep -v "rm /opt/FDMR-Monitor/data/*") | crontab - +(crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/cpu.sh") | crontab - +(crontab -l | grep -v "/opt/FDMR-Monitor/sysinfo/graph.sh") | crontab - +sudo systemctl stop mariadb.service 2>/dev/null || true +sudo systemctl stop proxy.service 2>/dev/null || true +sudo systemctl stop fdmr_mon.service 2>/dev/null || true +sudo systemctl stop fdmr_mon2.service 2>/dev/null || true +sudo systemctl disable fdmr_mon2.service 2>/dev/null || true +sudo systemctl disable fdmr_mon.service 2>/dev/null || true +sudo systemctl disable proxy.service 2>/dev/null || true +sudo systemctl disable mariadb.service 2>/dev/null || true + +if [ "$(ls -A "/opt/ADN-DMR-Peer-Server/data/")" ]; then + rm -rf "/opt/ADN-DMR-Peer-Server/data/"* >/dev/null 2>&1 +fi +if [ -f "/etc/nginx/sites-enabled/defauld" ]; then + rm /etc/nginx/sites-enabled/defauld +fi +if [ -f "/etc/nginx/sites-enabled/000" ]; then + rm /etc/nginx/sites-enabled/000 +fi + +sudo ln -sf /etc/nginx/sites-available/000 /etc/nginx/sites-enabled/adn + +sed -i "s|wsn0|adn|g" /etc/nginx/sites-enabled/adn +sed -i "s|wd0p|80|g" /etc/nginx/sites-enabled/adn +sed -i "s|w0d0|/opt/adn-dashboard/html|g" /etc/nginx/sites-enabled/adn + +# Iniciar y habilitar +servicios="proxy2.service adn-parrot.service adn-server.service fdmr_mon3.service" + +# Luego, iniciar todos los servicios +for servicio in $servicios; do + echo "Iniciando $servicio" + sudo systemctl start "$servicio" 2>/dev/null || true + sudo systemctl enable "$servicio" 2>/dev/null || true +done + +sudo systemctl restart nginx +menu-adn + + + + + diff --git a/install.sh b/install.sh index bd8e326..2f9b23d 100644 --- a/install.sh +++ b/install.sh @@ -142,6 +142,21 @@ then mkdir -p /var/log/ADN fi ######################## +if [ ! -f "/opt/wdp" ]; then +cat > /opt/wdp <<- "EOFX" +############################################ +# Select number port, ADN-Server Dashboard # +############################################ + +Web-Dashboar-name: adn +Web-Dashboar-Port: 80 +Web-Dashboar-dns: +Web-Dashboar-dir: /opt/adn-dashboard/html +Web-Dashboar-select: fdmr_mon3 +Web-Dashboar-soft: /opt/FDMR-Monitor2 + +EOFX +fi if [ -f "/opt/obp.txt" ] then echo "found file" diff --git a/update.sh b/update.sh index 37edde3..a5545ff 100644 --- a/update.sh +++ b/update.sh @@ -29,10 +29,10 @@ cat > /opt/wdp <<- "EOFX" ############################################ Web-Dashboar-name: adn -Web-Dashboar-Port: 80 -Web-Dashboar-dns: -Web-Dashboar-dir: /var/www/fdmr2 -Web-Dashboar-select: fdmr_mon2 +Web-Dashboar-Port: 80 +Web-Dashboar-dns: +Web-Dashboar-dir: /opt/adn-dashboard/html +Web-Dashboar-select: fdmr_mon3 Web-Dashboar-soft: /opt/FDMR-Monitor2 EOFX