From 7339139af4913702c21585a8ccd18dbaf3c61dde Mon Sep 17 00:00:00 2001 From: Esteban Mackay Q Date: Mon, 2 Oct 2023 13:02:57 -0500 Subject: [PATCH] update --- install.sh | 25 +------------------------ update.sh | 39 ++++++--------------------------------- 2 files changed, 7 insertions(+), 57 deletions(-) diff --git a/install.sh b/install.sh index 4dbda4f..535829f 100644 --- a/install.sh +++ b/install.sh @@ -131,29 +131,7 @@ else #Coloque abajo su lista de obp y peer EOF fi -###################### -if [ -f "/opt/rules.txt" ] -then - echo "rules found" -else - sudo cat > /opt/rules.txt <<- "EOF" -BRIDGES = { - - '9990': [ - {'SYSTEM': 'ECHO', 'TS': 2, 'TGID': 9990, 'ACTIVE':True, 'TIMEOUT': 0, 'TO_TYPE': 'NONE', 'ON': [9990], 'OFF': [], 'RESET': []}, - ] - - - -} -if __name__ == '__main__': - from pprint import pprint - pprint(BRIDGES) - - -EOF -fi -############ +################################## if [ -f "/opt/extra-1.sh" ] then echo "found file" @@ -357,7 +335,6 @@ rm /opt/FreeDMR-SAMPLE.cfg cd /opt/FreeDMR/ mv loro.cfg /opt/FreeDMR/playback.cfg sed -i 's/54915/49061/' /opt/FreeDMR/playback.cfg -sudo cat /opt/rules.txt >> /opt/FreeDMR/config/rules.py sudo chmod +x /opt/FreeDMR/config/* ####################### #FDMR-Monitor diff --git a/update.sh b/update.sh index 17d1178..101755d 100644 --- a/update.sh +++ b/update.sh @@ -134,10 +134,9 @@ while : ; do choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FreeDMR" --menu "Nota Importante: debe debe agregar todos sus obp en la opcion numero uno, ( 1-Lista de OBP )antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo la carpeta /opt/FreeDMR, al finalizar la actualizacion el servicio Freedmr se reinniciara automaticamente. " 18 55 5 \ 1 " List OBP " \ -2 " List Rules " \ -3 " shell extra " \ -4 " Iniciar Actualizacion FreeDMR " \ -5 " Menu Principal " 3>&1 1>&2 2>&3) +2 " shell extra " \ +3 " Iniciar Actualizacion FreeDMR " \ +4 " Menu Principal " 3>&1 1>&2 2>&3) exitstatus=$? #on recupere ce choix #exitstatus=$? @@ -151,12 +150,10 @@ case $choix in 1) sudo nano /opt/obp.txt ;; 2) -sudo nano /opt/rules.txt ;; -3) sudo nano /opt/extra-1.sh && chmod +x /opt/extra* ;; -4) +3) sh /opt/fdmr-update.sh ;; -5) +4) break; esac done @@ -308,30 +305,7 @@ SINGLE_MODE: True VOICE_IDENT: False EOFA1 -###################### -if [ -f "/opt/rules.txt" ] -then - echo "rules found" -else - sudo cat > /opt/rules.txt <<- "EOF" -BRIDGES = { - - '9990': [ - {'SYSTEM': 'ECHO', 'TS': 2, 'TGID': 9990, 'ACTIVE':True, 'TIMEOUT': 0, 'TO_TYPE': 'NONE', 'ON': [9990], 'OFF': [], 'RESET': []}, - ] - - - -} -if __name__ == '__main__': - from pprint import pprint - pprint(BRIDGES) - - -EOF -fi -sudo sed -i "s/EchoTest/ECHO/g" /opt/rules.txt -############ +############################# sudo cat > /opt/fdmr-update.sh <<- "EOFD1" #!/bin/bash @@ -472,7 +446,6 @@ rm /opt/FreeDMR-SAMPLE.cfg cd /opt/FreeDMR/ mv loro.cfg /opt/FreeDMR/playback.cfg sudo sed -i 's/54915/49061/' /opt/FreeDMR/playback.cfg -sudo cat /opt/rules.txt >> /opt/FreeDMR/config/rules.py sudo chmod +x /opt/FreeDMR/config/* cp /opt/FDMR-Monitor/proxy/hotspot_proxy_v2.py /opt/FreeDMR/hotspot_proxy_v2.py