commit 07f6ac8554b92194acf1d8a9ac1e00d31c83c1e5
parent 56316825c16e80e59e3fa42f74674790900def63
Author: Florian Dold <florian@dold.me>
Date: Mon, 5 Feb 2024 22:36:47 +0100
-initialize variable in script
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/libeufin-dbconfig b/contrib/libeufin-dbconfig
@@ -133,6 +133,9 @@ fi
# Both are the same now!
DBNAME=$BANK_DBNAME
+# The DB is created by the nexus user.
+# This is an arbitrary choice we make here.
+DBUSER=$NEXUS_DBUSER
if sudo -i -u postgres psql "$DBNAME" </dev/null 2>/dev/null; then
if [ 1 = "$RESET_DB" ]; then
@@ -152,7 +155,6 @@ fi
if [ 1 = "$DO_CREATE" ]; then
echo "Creating database '$DBNAME'." 1>&2
-
if ! sudo -i -u postgres createdb -O "$DBUSER" "$DBNAME"; then
echo "Failed to create database '$DBNAME'"
exit 1