libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 9cf2e87353147cd8775226fb6fd4e10ddb91222a
parent aa12fde9e406f7292894776a58a3dcd2cb919df3
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 24 Nov 2024 15:17:56 +0100

allow forcing config file

Diffstat:
Mcontrib/libeufin-dbconfig | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/contrib/libeufin-dbconfig b/contrib/libeufin-dbconfig @@ -35,7 +35,7 @@ function exit_fail() { exit 1 } -VALID_ARGS=`getopt -o hrspu:v: -l help,reset,skip,permissions,nexus-user:,bank-user:,only-nexus,only-bank -n 'libeufin-dbconfig' -- "$@"` +VALID_ARGS=`getopt -o b:hrn:psu:v: -l bank-config:,help,nexus-config:,reset,skip,permissions,nexus-user:,bank-user:,only-nexus,only-bank -n 'libeufin-dbconfig' -- "$@"` if [ $? != 0 ] ; then @@ -43,16 +43,16 @@ then fi eval set -- "$VALID_ARGS" -# FIXME: add support for -c $CONF, then fix ansible libeufin-nexus main.yml! - function usage { cat - <<EOF libeufin-dbconfig Setup databases for libeufin components. Arguments mandatory for long options are also mandatory for short options. + -b, --bank-config=FILE use CONFIGFILE for the Bank configuration file (default: $BANK_CFGFILE) -h, --help print this help -r, --reset reset database (dangerous) -s, --skip skip database initialization + -n, --nexus-config=FILE use CONFIGFILE for the Nexus configuration file (default: $NEXUS_CFGFILE) -p, --permissions force permission setup even without database initialization -u, --nexus-user=NEXUS_USER libeufin-nexus to be run by USER (default: $NEXUS_DBUSER) -v, --bank-user=BANK_USER libeufin-bank to be run by USER (default: $BANK_DBUSER) @@ -64,9 +64,11 @@ EOF # Parse command-line options while true; do case "$1" in + -b | --bank-config) BANK_CFGFILE="$1"; shift 2 ;; -h | --help) usage; exit 0 ;; -r | --reset) RESET_DB="1"; shift ;; -s | --skip) SKIP_INIT="1"; shift ;; + -n | --nexus-config) NEXUS_CFGFILE="$1"; shift 2 ;; -p | --permissions) FORCE_PERMS="1"; shift ;; --only-nexus) SKIP_BANK="1"; shift ;; --only-bank) SKIP_NEXUS="1"; shift ;;