mirror of https://gitlab.com/hp3icc/emq-TE1.git
33 lines
834 B
Plaintext
33 lines
834 B
Plaintext
cat > /bin/menu-ionos <<- "EOF"
|
|
#!/bin/bash
|
|
while : ; do
|
|
choix=$(whiptail --title "Raspbian Proyect HP3ICC Menu IonosPhere" --menu "Suba o Baje con las flechas del teclado y seleccione el numero de opcion" 20 50 11 \
|
|
1 " Editar Ionosphere APRS " \
|
|
2 " Iniciar APRS " \
|
|
3 " Detener APRS " \
|
|
4 " 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/ionsphere/ionosphere-raspberry-pi/config/config.yml ;;
|
|
2)
|
|
systemctl enable ionos.service && sudo systemctl restart ionos.service ;;
|
|
3)
|
|
sudo systemctl stop ionos.service && sudo systemctl disable ionos.service ;;
|
|
4)
|
|
break;
|
|
esac
|
|
done
|
|
exit 0
|
|
EOF
|
|
####
|
|
chmod +x /bin/menu-ionos
|