From bf74055dc49a26b35e32f5dd9335fc664a40b109 Mon Sep 17 00:00:00 2001 From: "Esteban Mackay Q." Date: Sun, 2 Jun 2024 02:23:46 -0500 Subject: [PATCH] Update emq-daprs.sh --- emq-daprs.sh | 50 +++----------------------------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/emq-daprs.sh b/emq-daprs.sh index 4606752..dfe325a 100644 --- a/emq-daprs.sh +++ b/emq-daprs.sh @@ -31,9 +31,7 @@ choix=$(whiptail --title "D-APRS KF7EEL / Raspbian Proyect HP3ICC Esteban Mackay 1 " Editar igate" \ 2 " Iniciar Igate " \ 3 " Detener Igate " \ -4 " Dashboard on " \ -5 " Dashboard off " \ -6 " Salir del menu " 3>&1 1>&2 2>&3) +4 " Salir del menu " 3>&1 1>&2 2>&3) exitstatus=$? #on recupere ce choix @@ -63,28 +61,6 @@ sudo systemctl stop daprs.service && sudo systemctl start daprs.service && sudo 3) sudo systemctl stop daprs.service && sudo systemctl disable daprs.service ;; 4) -if sudo systemctl status daprs-board.service |grep "service; enabled;" >/dev/null 2>&1 - then - sudo systemctl disable daprs-board.service -fi -if sudo systemctl status daprs-board.service |grep active >/dev/null 2>&1 -then - sudo systemctl stop daprs-board.service -fi -variable80=$(grep "DASH_PORT:" /opt/D-APRS/gps_data.cfg | grep -Eo '[A.0-9]{1,9}') -if sudo netstat -tuln | grep -q "0.0.0.0:$variable80 "; then - whiptail --title "Check Port" --msgbox "El puerto $variable80 esta ocupado , The port $variable80 is busy" 0 50 -else - - if ! sudo systemctl status daprs-board.service |grep "service; enabled;" >/dev/null 2>&1 - then - sudo systemctl enable daprs-board.service - fi - sudo systemctl start daprs-board.service -fi ;; -5) -sudo systemctl stop daprs-board.service && sudo systemctl disable daprs-board.service ;; -6) break; esac done @@ -109,35 +85,15 @@ WantedBy=multi-user.target EOF -# -sudo cat > /lib/systemd/system/daprs-board.service <<- "EOF" -[Unit] -Description=Dashboard D-APRS -After=network-online.target syslog.target -Wants=network-online.target - -[Service] -StandardOutput=null -WorkingDirectory=/opt/D-APRS/dashboard -RestartSec=3 -ExecStart=/usr/bin/python3 /opt/D-APRS/dashboard/dashboard.py -c /opt/D-APRS/gps_data.cfg -Restart=on-abort - -[Install] -WantedBy=multi-user.target - - -EOF -# +## sudo chmod -R 777 /opt/D-APRS/* sudo chmod -R +x /opt/D-APRS/* ln -sf /bin/menu-igate /bin/MENU-IGATE sudo chmod +x /bin/menu-igate sudo chmod +x /bin/MENU-IGATE -sudo chmod 755 /lib/systemd/system/daprs-board.service sudo chmod 755 /lib/systemd/system/daprs.service sudo systemctl daemon-reload -/usr/bin/python3 -m pip install --upgrade -r requirements.txt +#/usr/bin/python3 -m pip install --upgrade -r requirements.txt # Registra el final en /opt/curl.txt echo "Finalizado: $SCRIPT_NAME" >> /opt/curl.txt