Improve dbconfig support

This commit is contained in:
Jérôme Schneider 2013-11-19 12:14:39 +01:00
parent 61c6b86801
commit 929cb30f2b
3 changed files with 6 additions and 7 deletions

View File

@ -37,11 +37,12 @@ case "$1" in
. /usr/share/debconf/confmodule
# source dbconfig-common shell library, and call the hook function
if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then
. /usr/share/dbconfig-common/dpkg/postinst.pgsql
dbc_generate_include=template:/etc/authentic2/db.conf
dbc_generate_include_args="-o template_infile=/usr/share/authentic2/templates/db.conf -U"
dbc_generate_include_owner="authentic"
dbc_generate_include_owner="root:root"
dbc_generate_include_perms="640"
dbc_sql_substitutions=yes
. /usr/share/dbconfig-common/dpkg/postinst.pgsql
dbc_go authentic2 $@
fi

7
debian/control vendored
View File

@ -29,10 +29,9 @@ Package: authentic2
Architecture: all
Pre-Depends: python-django (>= 1.5)
Depends: ${misc:Depends}, adduser,
python-authentic2,
python-psycopg2,
gunicorn,
dbconfig-common
python-authentic2, python-psycopg2,
gunicorn, dbconfig-common,
debconf | debconf-2.0, ucf
Recommends: nginx, postgresql-client
Description: Versatile identity server Python module
Authentic is a versatile identity provider aiming to address a broad

1
debian/db.conf vendored
View File

@ -1,4 +1,3 @@
#!/bin/sh
export DATABASE_ENGINE='django.db.backends.postgresql_psycopg2'
export DATABASE_NAME='_DBC_DBNAME_'