67 lines
1.6 KiB
Bash
67 lines
1.6 KiB
Bash
sudo cat > /bin/menu-update <<- "EOF"
|
|
#!/bin/bash
|
|
while : ; do
|
|
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FDMR-Monitor OA4DOA" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente.
|
|
" 17 50 4 \
|
|
1 " Update FreeDMR " \
|
|
2 " Update FDMR-Monitor " \
|
|
3 " Menu Principal " 3>&1 1>&2 2>&3)
|
|
exitstatus=$?
|
|
#on recupere ce choix
|
|
#exitstatus=$?
|
|
if [ $exitstatus = 0 ]; then
|
|
echo "Your chosen option:" $choix
|
|
else
|
|
echo "You chose cancel."; break;
|
|
fi
|
|
# case : action en fonction du choix
|
|
case $choix in
|
|
1)
|
|
menu-up-fdmr ;;
|
|
2)
|
|
menu-up-fdmon ;;
|
|
3)
|
|
break;
|
|
esac
|
|
done
|
|
exit 0
|
|
|
|
|
|
EOF
|
|
#
|
|
sudo cat > /bin/menu-up-fdmon <<- "EOF"
|
|
#!/bin/bash
|
|
while : ; do
|
|
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FDMR-Monitor OA4DOA" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente.
|
|
" 17 50 4 \
|
|
1 " shell extra " \
|
|
2 " Iniciar Actualizacion HBMon2 " \
|
|
3 " Menu Principal " 3>&1 1>&2 2>&3)
|
|
exitstatus=$?
|
|
#on recupere ce choix
|
|
#exitstatus=$?
|
|
if [ $exitstatus = 0 ]; then
|
|
echo "Your chosen option:" $choix
|
|
else
|
|
echo "You chose cancel."; break;
|
|
fi
|
|
# case : action en fonction du choix
|
|
case $choix in
|
|
1)
|
|
sudo nano /opt/extra-2.sh && chmod +x /opt/extra* ;;
|
|
2)
|
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-SERVER-Install/main/selfservice-update.sh)" ;;
|
|
3)
|
|
break;
|
|
esac
|
|
done
|
|
exit 0
|
|
|
|
|
|
EOF
|
|
#
|
|
|
|
#
|
|
chmod +x /bin/menu-*
|
|
menu-update
|