replace yes/no by emoji
This commit is contained in:
parent
153ec73aa3
commit
e38781f509
|
@ -39,6 +39,8 @@ WEB_HTTPS="$(form_yes_no -t "$TITLE" -l "Support of HTTPS (recommanded)")"
|
|||
|
||||
if [ "$WEB_HTTP" = "yes" ] && [ "$WEB_HTTPS" = "yes" ]; then
|
||||
WEB_HTTPS_FORCE="$(form_yes_no -t "$TITLE" -l "Redirect HTTP to HTTPS (recommanded)")"
|
||||
else
|
||||
WEB_HTTPS_FORCE="no"
|
||||
fi
|
||||
|
||||
#if [ "$WEB_HTTPS" = "yes" ]; then
|
||||
|
@ -61,7 +63,7 @@ if [ "$PHP_ENABLED" = "yes" ]; then
|
|||
exit_if_empty "$PHP_VERSION" "Aborded! (PHP_VERSION_EMPTY)"
|
||||
fi
|
||||
|
||||
USER_PASSWORD="$(tr -dc "12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB" < /dev/urandom | head -c 16)"
|
||||
USER_PASSWORD="$(tr -dc "0123456789!@#$%()[]*@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" < /dev/urandom | head -c 20)"
|
||||
|
||||
SYSTEM_USER_USERNAME="$(form_input -t "$TITLE" -l "System username" -d "web" -r)"
|
||||
SYSTEM_USER_GROUP="webgroup"
|
||||
|
@ -94,7 +96,7 @@ export WEB_HTTPS_FORCE
|
|||
TMP_FILE="/tmp/vhost-add-$(tr -dc "qwertQWERTasdfgASDFGzxcvbZXCVB" < /dev/urandom | head -c 16)"
|
||||
template summary > "$TMP_FILE"
|
||||
chmod 600 "$TMP_FILE"
|
||||
whiptail --textbox "$TMP_FILE" 20 80
|
||||
whiptail --textbox "$TMP_FILE" 25 80
|
||||
rm "$TMP_FILE"
|
||||
|
||||
CONTINUE="$(form_yes_no -t "$TITLE" -l "Do you confirm?")"
|
||||
|
@ -159,7 +161,7 @@ done
|
|||
|
||||
export USER_PASSWORD
|
||||
|
||||
TMP_FILE="/tmp/vhost-add-$(tr -dc "qwertQWERTasdfgASDFGzxcvbZXCVB" < /dev/urandom | head -c 16)"
|
||||
TMP_FILE="/tmp/vhost-add-$(tr -dc "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" < /dev/urandom | head -c 16)"
|
||||
template result > "$TMP_FILE"
|
||||
chmod 600 "$TMP_FILE"
|
||||
whiptail --textbox "$TMP_FILE" 25 80
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
│ GROUP │ {{ '%- 25s'|format(SYSTEM_USER_GROUP) }} │
|
||||
└──────────┴───────────────────────────┘
|
||||
┌──────────────┬─────┐
|
||||
│ HTTP │ {{ '%- 3s'|format(WEB_HTTP) }} │
|
||||
│ HTTPS │ {{ '%- 3s'|format(WEB_HTTPS) }} │
|
||||
│ HTTP → HTTPS │ {{ '%- 3s'|format(WEB_HTTPS_FORCE) }} │
|
||||
│ HTTP │ {{ '%- 3s'|format(WEB_HTTP|replace({'yes': ' ✔ ', 'no': ' ✖ '})) }} │
|
||||
│ HTTPS │ {{ '%- 3s'|format(WEB_HTTPS|replace({'yes': ' ✔ ', 'no': ' ✖ '})) }} │
|
||||
│ HTTP → HTTPS │ {{ '%- 3s'|format(WEB_HTTPS_FORCE|replace({'yes': ' ✔ ', 'no': ' ✖ '})) }} │
|
||||
└──────────────┴─────┘
|
||||
┌─────────────┬─────┐
|
||||
│ PHP ENABLED │ {{ '%- 3s'|format(PHP_ENABLED) }} │
|
||||
│ PHP ENABLED │ {{ '%- 3s'|format(PHP_ENABLED|replace({'yes': ' ✔ ', 'no': ' ✖ '})) }} │
|
||||
│ PHP VERSION │ {{ '%- 3s'|format(PHP_VERSION) }} │
|
||||
└─────────────┴─────┘
|
||||
|
|
Caricamento…
Fai riferimento in un nuovo problema