summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine A <>2024-02-20 16:04:09 +0100
committerAntoine A <>2024-02-20 16:04:09 +0100
commita5ad1dd966f17a085607c3d4ed3b629d35c94268 (patch)
tree7d7c35ab8214d752eef6f628da7bb6baf9ec3de9
parent9b974ef0e13cf15e4333bced01bd027ab5dce977 (diff)
downloaddeployment-a5ad1dd966f17a085607c3d4ed3b629d35c94268.tar.gz
deployment-a5ad1dd966f17a085607c3d4ed3b629d35c94268.tar.bz2
deployment-a5ad1dd966f17a085607c3d4ed3b629d35c94268.zip
Improve regional currency script
-rwxr-xr-xregional-currency/functions.sh28
1 files changed, 14 insertions, 14 deletions
diff --git a/regional-currency/functions.sh b/regional-currency/functions.sh
index 3dc2626..edc824a 100755
--- a/regional-currency/functions.sh
+++ b/regional-currency/functions.sh
@@ -50,14 +50,14 @@ function ask_questions() {
fi
if test -z "${TLS_EMAIL:-}"; then
if test "${ENABLE_TLS:-}" == y; then
- read -r -p "Enter an email address for Let's Encrypt: " TLS_EMAIL
+ read -r -p "- Enter an email address for Let's Encrypt: " TLS_EMAIL
echo "TLS_EMAIL=${TLS_EMAIL}" >>config/user.conf
fi
fi
if test -z "${TLS_TOS:-}"; then
if test "${ENABLE_TLS:-}" == y; then
- echo "Please read the Terms of Service at https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf."
- read -r -p "You must agree in order to register with the ACME server. Do you agree? (y/n): " TLS_TOS
+ echo "- Please read the Terms of Service at https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf."
+ read -r -p "- You must agree in order to register with the ACME server. Do you agree? (y/n): " TLS_TOS
if test "${TLS_TOS:-y}" != y; then
say "You must agree in order to register with the ACME server"
exit 1
@@ -66,31 +66,26 @@ function ask_questions() {
fi
fi
if test -z "${DO_OFFLINE:-}"; then
- read -r -p "Do you want Taler Exchange keys in this server (y), or externally in other server (n) ?" DO_OFFLINE
+ read -r -p "Do you want Taler Exchange keys on this server (y) or externally on another server (n) ?" DO_OFFLINE
echo "DO_OFFLINE=${DO_OFFLINE}" >>config/user.conf
fi
if test -z "${MASTER_PUBLIC_KEY:-}"; then
if test "${DO_OFFLINE:-y}" == n; then
- read -r -p "Enter the exchange-offline master public key: " MASTER_PUBLIC_KEY
+ read -r -p "- Enter the exchange-offline master public key: " MASTER_PUBLIC_KEY
echo "MASTER_PUBLIC_KEY=${MASTER_PUBLIC_KEY}" >>config/user.conf
fi
fi
- if test -z "${BANK_ADMIN_PASSWORD:-}"; then
- read -r -s -p "Enter the admin password for the bank (or press enter to autogenerate password): " BANK_ADMIN_PASSWORD
- echo "BANK_ADMIN_PASSWORD=$(printf '%q' "${BANK_ADMIN_PASSWORD}")" >>config/user.conf
- echo "" # force new line
- fi
if test -z "${DO_TELESIGN:-}"; then
read -r -p "Setup sms two-factor authentication using Telesign https://www.telesign.com? (y/n): " DO_TELESIGN
if test "${DO_TELESIGN:-y}" != n; then
- read -r -p "Enter your Telesign Customer ID: " TELESIGN_CUSTOMER_ID
- read -r -s -p "Enter your Telesign API Key: " TELESIGN_API_KEY
+ read -r -p "- Enter your Telesign Customer ID: " TELESIGN_CUSTOMER_ID
+ read -r -s -p "- Enter your Telesign API Key: " TELESIGN_API_KEY
echo "" # force new line
- read -r -p "Enter a phone number to test your API key (e.g. '+447911123456'): " TELESIGN_PHONE
+ read -r -p "- Enter a phone number to test your API key (e.g. '+447911123456'): " TELESIGN_PHONE
TELESIGN_AUTH_TOKEN=$(echo "$TELESIGN_CUSTOMER_ID:$TELESIGN_API_KEY" | base64 -w 0)
export AUTH_TOKEN=$TELESIGN_AUTH_TOKEN
echo "12345" | libeufin-tan-sms.sh $TELESIGN_PHONE
- read -r -s -p "Enter the code received by $TELESIGN_PHONE : " TELESIGN_TEST_CODE
+ read -r -s -p "- Enter the code received by $TELESIGN_PHONE : " TELESIGN_TEST_CODE
if test "${TELESIGN_TEST_CODE:-y}" != "12345"; then
say "Wrong code, rerun this script to enter the right Telesign auth info"
exit 1
@@ -99,6 +94,11 @@ function ask_questions() {
fi
echo "DO_TELESIGN=${DO_TELESIGN}" >>config/user.conf
fi
+ if test -z "${BANK_ADMIN_PASSWORD:-}"; then
+ read -r -s -p "Enter the admin password for the bank (or press enter to autogenerate password): " BANK_ADMIN_PASSWORD
+ echo "BANK_ADMIN_PASSWORD=$(printf '%q' "${BANK_ADMIN_PASSWORD}")" >>config/user.conf
+ echo "" # force new line
+ fi
}
function normalize_currency() {