add better render for summary and result

This commit is contained in:
Simon Vieille 2019-07-31 11:35:41 +02:00
parent 6203df8a73
commit b7b1330bde
Signed by: deblan
GPG Key ID: 03383D15A1D31745
3 changed files with 25 additions and 16 deletions

View File

@ -151,5 +151,5 @@ export USER_PASSWORD
TMP_FILE="/tmp/vhost-add-$(tr -dc "qwertQWERTasdfgASDFGzxcvbZXCVB" < /dev/urandom | head -c 16)" TMP_FILE="/tmp/vhost-add-$(tr -dc "qwertQWERTasdfgASDFGzxcvbZXCVB" < /dev/urandom | head -c 16)"
template result > "$TMP_FILE" template result > "$TMP_FILE"
chmod 600 "$TMP_FILE" chmod 600 "$TMP_FILE"
whiptail --textbox "$TMP_FILE" 8 0 whiptail --textbox "$TMP_FILE" 25 80
rm "$TMP_FILE" rm "$TMP_FILE"

View File

@ -1,2 +1,5 @@
Username: {{ SYSTEM_USER_USERNAME }} {% extends 'summary.twig' %}
Password: {{ USER_PASSWORD }}
{% block user_password %}
│ PASSWORD │ {{ '%- 25s'|format(USER_PASSWORD) }}
{% endblock %}

View File

@ -1,13 +1,19 @@
DOMAIN: {{ DOMAIN }} ┌───────────┬─────────────────────────────────────────────────────────┐
DOMAIN_ALIASES: {{ DOMAIN }} │ DOMAIN │ {{ '%- 55s'|format(DOMAIN) }}
DOCUMENT_ROOT: {{ DOCUMENT_ROOT }} │ ALIASES │ {{ '%- 55s'|format(DOMAIN_ALIASES) }}
│ DIRECTORY │ {{ '%- 55s'|format(DOCUMENT_ROOT) }}
SYSTEM_USER_USERNAME: {{ SYSTEM_USER_USERNAME }} └───────────┴─────────────────────────────────────────────────────────┘
SYSTEM_USER_GROUP: {{ SYSTEM_USER_GROUP }} ┌──────────┬───────────────────────────┐
│ USERNAME │ {{ '%- 25s'|format(SYSTEM_USER_USERNAME) }}
WEB_HTTP: {{ WEB_HTTP }} {% block user_password %}{% endblock %}
WEB_HTTPS: {{ WEB_HTTPS }} │ GROUP │ {{ '%- 25s'|format(SYSTEM_USER_GROUP) }}
WEB_HTTPS_FORCE: {{ WEB_HTTPS_FORCE }} └──────────┴───────────────────────────┘
┌──────────────┬─────┐
PHP_ENABLED: {{ PHP_ENABLED }} │ HTTP │ {{ '%- 3s'|format(WEB_HTTP) }}
PHP_VERSION: {{ PHP_VERSION }} │ HTTPS │ {{ '%- 3s'|format(WEB_HTTPS) }}
│ HTTP → HTTPS │ {{ '%- 3s'|format(WEB_HTTPS_FORCE) }}
└──────────────┴─────┘
┌─────────────┬─────┐
│ PHP ENABLED │ {{ '%- 3s'|format(PHP_ENABLED) }}
│ PHP VERSION │ {{ '%- 3s'|format(PHP_VERSION) }}
└─────────────┴─────┘