#!/bin/bash set -e . /conf/init-cdn-db.conf psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL CREATE USER cdn WITH PASSWORD \'"$cdn_password"\'; CREATE DATABASE cdn; GRANT ALL PRIVILEGES ON DATABASE cdn TO cdn; EOSQL