dbconfig: restart from amue configuration
This commit is contained in:
parent
8ad9b0a68b
commit
9366c073f5
|
@ -1,16 +1,12 @@
|
|||
#!/bin/sh
|
||||
# config maintainer script for foo-pgsql
|
||||
|
||||
# source debconf stuff
|
||||
. /usr/share/debconf/confmodule
|
||||
# source dbconfig-common shell library, and call the hook function
|
||||
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
|
||||
. /usr/share/dbconfig-common/dpkg/config
|
||||
dbc_dbtypes="pgsql"
|
||||
if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
|
||||
. /usr/share/dbconfig-common/dpkg/config.pgsql
|
||||
dbc_pgsql_createdb_encoding="UTF8"
|
||||
dbc_authmethod_user="ident"
|
||||
dbc_dbuser="authentic"
|
||||
dbc_dbname="authentic2"
|
||||
dbc_remote_questions_default=true
|
||||
dbc_go authentic2 $@
|
||||
fi
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@ AUTHENTIC_USER=authentic
|
|||
AUTHENTIC_GROUP=authentic
|
||||
AUTHENTIC_HOME=/var/lib/authentic2
|
||||
|
||||
export DEBCONF_DEBUG=developer
|
||||
export dbc_debug=1
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if ! getent group $AUTHENTIC_GROUP > /dev/null 2>&1; then
|
||||
|
@ -36,19 +33,6 @@ case "$1" in
|
|||
su authentic -p -c "/usr/bin/authentic2-ctl collectstatic --noinput --link"
|
||||
echo "..done"
|
||||
|
||||
# source debconf stuff
|
||||
. /usr/share/debconf/confmodule
|
||||
# source dbconfig-common shell library, and call the hook function
|
||||
if [ -f /usr/share/dbconfig-common/dpkg/postinst ]; then
|
||||
. /usr/share/dbconfig-common/dpkg/postinst
|
||||
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="root:root"
|
||||
dbc_generate_include_perms="644"
|
||||
dbc_sql_substitutions=yes
|
||||
dbc_go authentic2 $@
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
reconfigure)
|
||||
|
@ -67,7 +51,17 @@ case "$1" in
|
|||
;;
|
||||
esac
|
||||
|
||||
|
||||
# source debconf stuff
|
||||
. /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_perms="640"
|
||||
dbc_go amue-authentic2 $@
|
||||
fi
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
export DATABASE_ENGINE='django.db.backends.postgresql_psycopg2'
|
||||
export DATABASE_NAME='_DBC_DBNAME_'
|
||||
|
|
Loading…
Reference in New Issue