#!/bin/bash ################ sudo cat > /bin/menu-aprs <<- "EOF" #!/bin/bash while : ; do choix=$(whiptail --title "Raspbian Proyect HP3ICC Menu APRS" --menu "Suba o Baje con las flechas del teclado y seleccione el numero de opcion:" 24 67 15 \ 1 " APRS Direwolf " \ 2 " Python APRS Beacon " \ 3 " Python APRS WX " \ 4 " Salir del menu " 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-dw;; 2) menu-py-aprs;; 3) menu-py-wx;; 4) break; esac done exit 0 EOF # chmod +x /bin/menu* ln -sf /bin/menu-aprs /bin/MENU-APRS chmod +x /bin/MENU*