summaryrefslogtreecommitdiff
path: root/netzbon
diff options
context:
space:
mode:
authorMS <ms@taler.net>2023-12-05 15:34:23 +0100
committerMS <ms@taler.net>2023-12-05 15:34:23 +0100
commit9716b1d96f49546c6db1aa36fbeedfcc8de1041d (patch)
tree1882542f1ad3df41b910601fb616f4671dbe1b23 /netzbon
parent9292319f7e630e1dd37231097b36075799584699 (diff)
downloaddeployment-9716b1d96f49546c6db1aa36fbeedfcc8de1041d.tar.gz
deployment-9716b1d96f49546c6db1aa36fbeedfcc8de1041d.tar.bz2
deployment-9716b1d96f49546c6db1aa36fbeedfcc8de1041d.zip
move chmod before file usage
Diffstat (limited to 'netzbon')
-rwxr-xr-xnetzbon/install_packages.sh10
-rwxr-xr-xnetzbon/main.sh10
-rwxr-xr-xnetzbon/setup-exchange.sh22
3 files changed, 29 insertions, 13 deletions
diff --git a/netzbon/install_packages.sh b/netzbon/install_packages.sh
index 4f5b592..76ab05b 100755
--- a/netzbon/install_packages.sh
+++ b/netzbon/install_packages.sh
@@ -58,13 +58,3 @@ apt install taler-exchange \
taler-wallet-cli \
libeufin-bank \
libeufin-nexus -y
-
-# temporary: remove once LibEuFin Debian packages reach stability
-if ! test -d /libeufin
-then
- git clone git://git.taler.net/libeufin /libeufin
- cd /libeufin
- ./bootstrap
- ./configure --prefix=/usr
- make install
-fi
diff --git a/netzbon/main.sh b/netzbon/main.sh
index 23898ef..494f9f3 100755
--- a/netzbon/main.sh
+++ b/netzbon/main.sh
@@ -66,6 +66,16 @@ if test -z "${PROTO:-}"; then
echo "PROTO=$PROTO">>config/internal.conf
fi
+# FIXME: remove once LibEuFin Debian packages reach stability
+if ! test -d /libeufin
+then
+ git clone git://git.taler.net/libeufin /libeufin
+ cd /libeufin
+ ./bootstrap
+ ./configure --prefix=/usr
+ make install
+fi
+
config_services
# Final message to the user
diff --git a/netzbon/setup-exchange.sh b/netzbon/setup-exchange.sh
index 12dc2df..2b9457d 100755
--- a/netzbon/setup-exchange.sh
+++ b/netzbon/setup-exchange.sh
@@ -59,6 +59,9 @@ function die() {
# Just try if sudo works for diagnostics
sudo -i -u taler-exchange-offline id >/dev/null || die "Error: Unable to switch to taler-exchange-offline user"
+
+chmod a+r /etc/taler/taler.conf # FIXME-CG: Debian installation should set this
+
# Create master key as taler-exchange-offline *unless* user already
# set the MASTER_PUBLIC_KEY to some value we can use.
export MASTER_PRIV_DIR=.local/share/taler/exchange/offline-keys
@@ -75,7 +78,7 @@ if test -z "${MASTER_PUBLIC_KEY:-}"; then
"SECM_TOFU_FILE=\$HOME/${SECMOD_TOFU_FILE}\n"\
>/etc/taler/conf.d/offline-setup.conf
- MASTER_PUBLIC_KEY=$(sudo -i -u taler-exchange-offline taler-exchange-offline -LDEBUG setup)
+ MASTER_PUBLIC_KEY=$(sudo -i -u taler-exchange-offline taler-exchange-offline -c /etc/taler/taler.conf -LDEBUG setup)
echo "MASTER_PUBLIC_KEY=\"${MASTER_PUBLIC_KEY}\"" >>config/user.conf
if test -z "${DO_OFFLINE:-}"; then
# Set 'DO_OFFLINE'
@@ -85,7 +88,7 @@ if test -z "${MASTER_PUBLIC_KEY:-}"; then
else
say "Master public key is $MASTER_PUBLIC_KEY"
if test ${DO_OFFLINE:-y} == y; then
- MASTER_PUBLIC_KEY2=$(sudo -i -u taler-exchange-offline taler-exchange-offline setup)
+ MASTER_PUBLIC_KEY2=$(sudo -i -u taler-exchange-offline taler-exchange-offline -c /etc/taler/taler.conf setup)
if test "${MASTER_PUBLIC_KEY2}" != "${MASTER_PUBLIC_KEY}"; then
say "Error: master public key missmatch ${MASTER_PUBLIC_KEY2} does not match ${MASTER_PUBLIC_KEY}"
exit 1
@@ -124,6 +127,20 @@ ENABLE_CREDIT=YES
@inline-secret@ exchange-accountcredentials-default ../secrets/exchange-accountcredentials-default.secret.conf
EOF
+# FIXME-CG: def already in the Git, remove this
+# after the next .deb release
+cat << EOF > /etc/taler/conf.d/netzbon.conf
+[currency-netzbon]
+ENABLED=YES
+name=NetzBon
+code=NETZBON
+fractional_input_digits=2
+fractional_normal_digits=2
+fractional_trailing_zero_digits=2
+alt_unit_names = {"0":"NETZBON"}
+EOF
+chmod a+r /etc/taler/conf.d/netzbon.conf
+
cat << EOF > /etc/taler/secrets/exchange-db.secret.conf
[exchangedb-postgres]
CONFIG=postgres:///exchange
@@ -155,7 +172,6 @@ for SEC in $(taler-config -c /etc/taler/conf.d/"${CURRENCY}"-coins.conf -S | gre
taler-config -c /etc/taler/conf.d/"${CURRENCY}"-coins.conf -s "$SEC" -o CIPHER -V "RSA"
done
-chmod o+r /etc/taler/taler.conf # FIXME-CG: Debian installation should set this
# NOTE: already fixed in exchange.git, leaving in place
# until 0.9.4 release of fixed exchange Debian package. -CG
say "Initializing exchange database"