Skip to content

Instantly share code, notes, and snippets.

@Canx
Created September 4, 2018 20:07
Show Gist options
  • Save Canx/77ba21b774b7ba515a6d00fa99370ab8 to your computer and use it in GitHub Desktop.
Save Canx/77ba21b774b7ba515a6d00fa99370ab8 to your computer and use it in GitHub Desktop.
#!/bin/bash
HEIGHT=15
WIDTH=40
CHOICE_HEIGHT=4
BACKTITLE="Control de Internet, por Ruben Cancho."
TITLE="Menu principal"
MENU="Elige una opción:"
OPTIONS=(1 "Quitar Internet a todos"
2 "Dar Internet a todos"
3 "Permitir IPs de alumnos"
4 "Permitir URLs")
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
clear
case $CHOICE in
1) echo "1" ;;
2) echo "2" ;;
3) exec ./permitir_ips.sh ;;
4) exec ./permitir_urls.sh ;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment