taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit 695a517a2d20e85da64f02ab9604b2fff74b526e
parent 09765594aa0d6a30df58e025a0b0ccfd6628d9eb
Author: MS <ms@taler.net>
Date:   Tue, 24 Aug 2021 22:25:13 -1100

prepare script: DB-reset is optional

Diffstat:
Mbin/taler-deployment-prepare | 21++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/bin/taler-deployment-prepare b/bin/taler-deployment-prepare @@ -11,6 +11,15 @@ set -eu source "$HOME/activate" +# $1 = {yes,no} indicates WITH_DB_RESET. Defaults to no. +# Helps avoiding color Y destroying the DB while color X is in +# production. +WITH_DB_RESET=no + +if test $1 = yes; then + WITH_DB_RESET=yes +fi + if [[ -z ${TALER_ENV_NAME+x} ]]; then echo "TALER_ENV_NAME not set" exit 1 @@ -51,7 +60,9 @@ esac ## Step 1b: initialize database ## -taler-exchange-dbinit --reset +if test $WITH_DB_RESET = yes; then + taler-exchange-dbinit --reset +fi ## ## Step 2: Copy key material and update denom keys @@ -149,7 +160,9 @@ sleep 5 ## # Delete existing data from bank. -echo "yes" | taler-bank-manage django flush +if test $WITH_DB_RESET = yes; then + echo "yes" | taler-bank-manage django flush +fi case $TALER_ENV_NAME in demo|test|int|local|tanker) @@ -184,7 +197,9 @@ esac ## Step 6: Set up merchant ## -taler-merchant-dbinit --reset +if test $WITH_DB_RESET = yes; then + taler-merchant-dbinit --reset +fi # Making sure ARM is not running yet. taler-deployment-arm -e