merge-requests/1/head
Esteban Mackay Q 2 years ago
parent 0b89198f2e
commit 7339139af4

@ -131,29 +131,7 @@ else
#Coloque abajo su lista de obp y peer #Coloque abajo su lista de obp y peer
EOF EOF
fi 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" ] if [ -f "/opt/extra-1.sh" ]
then then
echo "found file" echo "found file"
@ -357,7 +335,6 @@ rm /opt/FreeDMR-SAMPLE.cfg
cd /opt/FreeDMR/ cd /opt/FreeDMR/
mv loro.cfg /opt/FreeDMR/playback.cfg mv loro.cfg /opt/FreeDMR/playback.cfg
sed -i 's/54915/49061/' /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/* sudo chmod +x /opt/FreeDMR/config/*
####################### #######################
#FDMR-Monitor #FDMR-Monitor

@ -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. 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 \ " 18 55 5 \
1 " List OBP " \ 1 " List OBP " \
2 " List Rules " \ 2 " shell extra " \
3 " shell extra " \ 3 " Iniciar Actualizacion FreeDMR " \
4 " Iniciar Actualizacion FreeDMR " \ 4 " Menu Principal " 3>&1 1>&2 2>&3)
5 " Menu Principal " 3>&1 1>&2 2>&3)
exitstatus=$? exitstatus=$?
#on recupere ce choix #on recupere ce choix
#exitstatus=$? #exitstatus=$?
@ -151,12 +150,10 @@ case $choix in
1) 1)
sudo nano /opt/obp.txt ;; sudo nano /opt/obp.txt ;;
2) 2)
sudo nano /opt/rules.txt ;;
3)
sudo nano /opt/extra-1.sh && chmod +x /opt/extra* ;; sudo nano /opt/extra-1.sh && chmod +x /opt/extra* ;;
4) 3)
sh /opt/fdmr-update.sh ;; sh /opt/fdmr-update.sh ;;
5) 4)
break; break;
esac esac
done done
@ -308,30 +305,7 @@ SINGLE_MODE: True
VOICE_IDENT: False VOICE_IDENT: False
EOFA1 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" sudo cat > /opt/fdmr-update.sh <<- "EOFD1"
#!/bin/bash #!/bin/bash
@ -472,7 +446,6 @@ rm /opt/FreeDMR-SAMPLE.cfg
cd /opt/FreeDMR/ cd /opt/FreeDMR/
mv loro.cfg /opt/FreeDMR/playback.cfg mv loro.cfg /opt/FreeDMR/playback.cfg
sudo sed -i 's/54915/49061/' /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/* sudo chmod +x /opt/FreeDMR/config/*
cp /opt/FDMR-Monitor/proxy/hotspot_proxy_v2.py /opt/FreeDMR/hotspot_proxy_v2.py cp /opt/FDMR-Monitor/proxy/hotspot_proxy_v2.py /opt/FreeDMR/hotspot_proxy_v2.py

Loading…
Cancel
Save

Powered by TurnKey Linux.