Skip to content

Commit

Permalink
Add OAuth variables to PostgreSQL script
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Jan 31, 2024
1 parent 4d1f515 commit 13f21f1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions imageroot/bin/postgresql_oauth_creation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@

set -e

client_id=${$client_id:?}
client_secret=${$client_secret:?}
redirect_uri=${$redirect_uri:?}
grant_types=${$grant_types:?}
scope=${$scope:?}
user_id=${$user_id:?}
db_name=${$db_name:?}
db_user=${$db_user:?}
db_pass=${$db_pass:?}
db_host=${$db_host:?}
db_port=${$db_port:?}

# Check if the database exists
if psql -h localhost -U mattuser -d postgres -lqt | cut -d \| -f 1 | grep -qw $db_name; then
echo "Database '$db_name' already exists."
Expand Down

0 comments on commit 13f21f1

Please sign in to comment.