diff options
author | Florian Dold <florian@dold.me> | 2024-08-26 20:36:41 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-08-26 20:36:41 +0200 |
commit | 2b0814d69a1ac675f317ed913d05c882b3bcee6d (patch) | |
tree | 061fa2c620f256a459d27efdd97659d51bffa0e1 | |
parent | 31d044f8cf4a711f3f9512a5b043fa3741a2f3b2 (diff) |
taler-auditor-dbconfig: set DBNAMEv0.12.1-dev.15
-rwxr-xr-x | contrib/taler-auditor-dbconfig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/taler-auditor-dbconfig b/contrib/taler-auditor-dbconfig index 1d70f7657..5542a037e 100755 --- a/contrib/taler-auditor-dbconfig +++ b/contrib/taler-auditor-dbconfig @@ -88,6 +88,11 @@ if ! echo "$DBPATH" | grep "postgres://" >/dev/null; then exit 1 fi +DBNAME=$(echo "$DBPATH" | + sed \ + -e "s/postgres:\/\/.*\///" \ + -e "s/?.*//") + if sudo -i -u postgres psql "$DBNAME" </dev/null 2>/dev/null; then if [ 1 = "$RESET_DB" ]; then echo "Deleting existing database '$DBNAME'." 1>&2 |