@ -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