2020-09-26 16:19:37 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-07-30 09:36:30 +02:00
|
|
|
# Create database for a ScoDoc departement
|
|
|
|
# This script must be executed as postgres super user
|
2020-09-26 16:19:37 +02:00
|
|
|
#
|
2021-07-23 13:45:56 +02:00
|
|
|
# $db_name is passed as an environment variable
|
2020-09-26 16:19:37 +02:00
|
|
|
|
|
|
|
source config.sh
|
|
|
|
source utils.sh
|
|
|
|
|
2021-07-30 09:36:30 +02:00
|
|
|
echo 'Creating postgresql database'
|
2021-07-27 13:27:21 +02:00
|
|
|
|
2021-07-30 09:36:30 +02:00
|
|
|
# ---
|
|
|
|
echo 'Creating postgresql database ' $db_name
|
|
|
|
createdb -E UTF-8 -p $POSTGRES_PORT -O $POSTGRES_USER $db_name
|
2020-09-26 16:19:37 +02:00
|
|
|
|