[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: have switch to enable online/o
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: have switch to enable online/offline key management |
Date: |
Sun, 05 Mar 2023 00:37:43 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 830b87a have switch to enable online/offline key management
830b87a is described below
commit 830b87a45c0f6d91d766f37f753af5ead19bfc9b
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Mar 5 00:37:41 2023 +0100
have switch to enable online/offline key management
---
netzbon/main.sh | 13 +++++++++++++
netzbon/setup-exchange.sh | 34 ++++++++++++++++++++++++----------
2 files changed, 37 insertions(+), 10 deletions(-)
diff --git a/netzbon/main.sh b/netzbon/main.sh
index b9c9761..42098a0 100755
--- a/netzbon/main.sh
+++ b/netzbon/main.sh
@@ -33,6 +33,19 @@ then
read -p "Use TLS? (y/n): " ENABLE_TLS
echo "ENABLE_TLS=${ENABLE_TLS}" >> config/user.conf
fi
+if test -z "${DO_OFFLINE:-}"
+then
+ read -p "Run taler-exchange-offline? (y/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 -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 "${SANDBOX_ADMIN_PASSWORD:-}"
then
read -s -p "Enter the admin password for the bank: " SANDBOX_ADMIN_PASSWORD
diff --git a/netzbon/setup-exchange.sh b/netzbon/setup-exchange.sh
index cecefb9..d4e2fca 100755
--- a/netzbon/setup-exchange.sh
+++ b/netzbon/setup-exchange.sh
@@ -47,14 +47,25 @@ export
MASTER_PRIV_DIR=.local/share/taler/exchange/offline-keys
export MASTER_PRIV_FILE=${MASTER_PRIV_DIR}/master.priv
if test -z ${MASTER_PUBLIC_KEY:-}
then
+ if test ${DO_OFFLINE:-y} == n
+ then
+ say "Error: No MASTER_PUBLIC_KEY but DO_OFFLINE set to NO"
+ exit 1
+ fi
say "Setting up offline key"
sudo -i -u taler-exchange-offline mkdir -p ${MASTER_PRIV_DIR}
sudo -i -u taler-exchange-offline gnunet-ecc -g1 ${MASTER_PRIV_FILE}
MASTER_PUBLIC_KEY=`sudo -i -u taler-exchange-offline gnunet-ecc -p
${MASTER_PRIV_FILE}`
+ echo "MASTER_PUBLIC_KEY=\"${MASTER_PUBLIC_KEY}\"" >> config/user.conf
+ if test -z ${DO_OFFLINE:-}
+ then
+ # Set 'DO_OFFLINE'
+ DO_OFFLINE=y
+ echo "DO_OFFLINE=y" >> config/user.conf
+ fi
fi
export MASTER_PUBLIC_KEY
-echo "MASTER_PUBLIC_KEY=\"${MASTER_PUBLIC_KEY}\"" >> config/taler-internal.conf
say "Setting up exchange database"
@@ -161,15 +172,18 @@ echo "DONE"
say "Offline interaction..."
-taler-exchange-offline \
- -c /etc/taler/taler.conf \
- download \
- sign \
- enable-account ${EXCHANGE_PAYTO} \
- wire-fee now iban ${CURRENCY}:0 ${CURRENCY}:0 \
- global-fee now ${CURRENCY}:0 ${CURRENCY}:0 ${CURRENCY}:0 1h 6y 0 \
- upload
-
+if test ${DO_OFFLINE} == y
+then
+ sudo -i -u taler-exchange-offline \
+ taler-exchange-offline \
+ -c /etc/taler/taler.conf \
+ download \
+ sign \
+ enable-account ${EXCHANGE_PAYTO} \
+ wire-fee now iban ${CURRENCY}:0 ${CURRENCY}:0 \
+ global-fee now ${CURRENCY}:0 ${CURRENCY}:0 ${CURRENCY}:0 1h 6y 0 \
+ upload
+fi
echo -n "Waiting for exchange /keys..."
curl --max-time 2 \
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: have switch to enable online/offline key management,
gnunet <=