summaryrefslogtreecommitdiff
path: root/bin/taler-deployment
diff options
context:
space:
mode:
authorms <ms@taler.net>2021-09-17 16:31:41 +0200
committerms <ms@taler.net>2021-09-17 16:31:41 +0200
commitd62c574bea9f6738f8db21c6dde7253a25be684c (patch)
tree91c694ef73b4ed6b1a150e8377836aece28fa8e8 /bin/taler-deployment
parenta9d6ff1768fc9bf13f52098da1af4507aca5861d (diff)
downloaddeployment-d62c574bea9f6738f8db21c6dde7253a25be684c.tar.gz
deployment-d62c574bea9f6738f8db21c6dde7253a25be684c.tar.bz2
deployment-d62c574bea9f6738f8db21c6dde7253a25be684c.zip
Generate Sandbox admin password, store in file, and load in env.
That is only needed when euFin is being configured to operate with Taler, because the deployment script needs to create three bank accounts at the Sandbox.
Diffstat (limited to 'bin/taler-deployment')
-rwxr-xr-xbin/taler-deployment7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/taler-deployment b/bin/taler-deployment
index e2fe9d9..4f111df 100755
--- a/bin/taler-deployment
+++ b/bin/taler-deployment
@@ -54,6 +54,7 @@ export TALER_ENV_URL_SYNC="{sync}"
export TALER_ENV_MERCHANT_BACKEND="{merchant_backend}"
export TALER_COVERAGE={coverage}
export TALER_ENV_FRONTENDS_APITOKEN="$(cat ~/merchant_auth_token)"
+export LIBEUFIN_ENV_SANDBOX_ADMIN_PASSWORD="$(cat ~/libeufin_admin_password)"
export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:$HOME/nexus.sqlite"
export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:$HOME/sandbox.sqlite"
"""
@@ -701,6 +702,12 @@ def bootstrap() -> None:
f.write(generate_apitoken())
print(f"Token file '{token_file}' created.")
+ sandbox_admin_password_file = Path.home() / "libeufin_admin_password"
+ if not sandbox_admin_password_file.is_file():
+ with sandbox_admin_password_file.open("w") as f:
+ f.write(generate_apitoken())
+ print(f"Libeufin Sandbox admin password file '{sandbox_admin_password_file}' created.")
+
with (home / "activate").open("w") as f:
f.write(
activate_template.format(