diff --git a/bin/vhost-add b/bin/vhost-add index 3f736bd..f5c8861 100755 --- a/bin/vhost-add +++ b/bin/vhost-add @@ -99,7 +99,7 @@ chmod 600 "$TMP_FILE" whiptail --textbox "$TMP_FILE" 25 80 rm "$TMP_FILE" -CONTINUE="$(form_yes_no -t "$TITLE" -l "Do you confirm?")" +CONTINUE="$(form_yes_no -t "$TITLE" -l "Do you confirm?" -n)" if [ "$CONTINUE" = "no" ]; then printf "Aborded!\\n" diff --git a/share/bin/form_yes_no b/share/bin/form_yes_no index 524de92..c7b0242 100755 --- a/share/bin/form_yes_no +++ b/share/bin/form_yes_no @@ -5,13 +5,15 @@ LABEL= ERROR=0 HEIGHT=8 WIDTH=50 +PARAMS= -while getopts "t:l:d:h:w:r" option; do +while getopts "t:l:d:h:w:rn" option; do case "$option" in l) LABEL="$OPTARG";; t) TITLE="$OPTARG";; h) HEIGHT="$OPTARG";; w) WIDTH="$OPTARG";; + n) PARAMS="$PARAMS --defaultno";; :) ERROR=1;; ?) ERROR=1;; esac @@ -21,7 +23,7 @@ if [ $ERROR -eq 1 ]; then exit 1 fi -if (whiptail --title "$TITLE" --yesno "$LABEL" $HEIGHT $WIDTH 3>&1 1>&2 2>&3) then +if (whiptail --title "$TITLE" --yesno "$LABEL" $PARAMS $HEIGHT $WIDTH 3>&1 1>&2 2>&3) then printf "yes" else printf "no" diff --git a/share/bin/template b/share/bin/template index 0dfecee..9605a52 100755 --- a/share/bin/template +++ b/share/bin/template @@ -2,4 +2,4 @@ . ./etc/config -$PHP_BIN -dvariables_order=EGPCS ./share/bin/twigc -E -d ./src/templates/ < "src/templates/${1}.twig" +"$PHP_BIN" -dvariables_order=EGPCS ./share/bin/twigc -E -d ./src/templates/ < "src/templates/${1}.twig"