From e3c9b26ec0e42fc4e587493f21f933ab4c2a7b12 Mon Sep 17 00:00:00 2001 From: DhananjayPurohit Date: Wed, 1 May 2024 21:46:31 +0530 Subject: [PATCH] fix: postgres command connection details --- keylistCron/send_commitment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keylistCron/send_commitment.sh b/keylistCron/send_commitment.sh index 1b63f803..13c6deb0 100644 --- a/keylistCron/send_commitment.sh +++ b/keylistCron/send_commitment.sh @@ -39,7 +39,7 @@ fi echo "Keylist $KEYLIST_HASH attestation completed successfully!" # Connect to the database and save the keylist JSON -PG_COMMAND="PGPASSWORD=mercurypass@12345 psql -h vultr-prod-e795780f-1f41-4d13-978d-5fd624923873-vultr-prod-86c1.vultrdb.com -p 16751 -d defaultdb -U mercury -c \"CREATE TABLE IF NOT EXISTS keylist_info ( json_data TEXT NOT NULL, keylist_hash TEXT NOT NULL ); INSERT INTO keylist_info (json_data, keylist_hash) VALUES ('$KEYLIST_JSON', '$KEYLIST_HASH');\"" +PG_COMMAND="PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -p $DB_PORT -d $DB_NAME -U $DB_USER -c \"CREATE TABLE IF NOT EXISTS keylist_info ( json_data TEXT NOT NULL, keylist_hash TEXT NOT NULL ); INSERT INTO keylist_info (json_data, keylist_hash) VALUES ('$KEYLIST_JSON', '$KEYLIST_HASH');\"" echo "PG_COMMAND $PG_COMMAND" # Execute the PostgreSQL command