forked from ScoDoc/ScoDoc
21 lines
457 B
Bash
Executable File
21 lines
457 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Create database for a ScoDoc instance
|
|
# This script must be executed as root
|
|
#
|
|
# $db_name is passed as an environment variable
|
|
|
|
source config.sh
|
|
source utils.sh
|
|
|
|
check_uid_root "$0"
|
|
|
|
# 1--- CREATION UTILISATEUR POSTGRESQL
|
|
init_postgres_user
|
|
|
|
# 2--- CREATION BASE UTILISATEURS
|
|
echo 'Creating postgresql database for users:' "$SCODOC_USER_DB"
|
|
su -c "createdb -E UTF-8 -p $POSTGRES_PORT -O $POSTGRES_USER $SCODOC_USER_DB" $POSTGRES_SUPERUSER
|
|
|
|
|