1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-11 16:57:23 +01:00

Added dialogs, so that the setup.sh can ask the user any questions even when its piped; Added additional email valdidation for the last step

This commit is contained in:
H8H
2014-08-21 03:09:09 +02:00
parent 6b52105b62
commit 980b83b124
2 changed files with 111 additions and 59 deletions

View File

@@ -127,3 +127,28 @@ function ufw_allow {
function restart_service {
hide_output service $1 restart
}
## Dialog Functions ##
function message_box {
dialog --title "$1" --msgbox "$2" 0 0
}
function input_box {
TMP=`mktemp`
dialog --title "$1" --inputbox "$2" 0 0 "$3" 2>$TMP
respose=$?
case $respose in
0)
result=$(<$TMP)
;;
1)
exit
;;
255)
exit
esac
rm $TMP
}