authentic.conf: test if db.con exists
This commit is contained in:
parent
9fdcea9642
commit
811702e340
|
@ -46,4 +46,4 @@ export EMAIL_SUBJECT_PREFIX='[Authentic2]'
|
|||
#
|
||||
|
||||
# do not remove this line, it imports db configuration from dbconfig-common
|
||||
. /etc/authentic2/db.conf
|
||||
[ -f /etc/authentic2/db.conf ] && . /etc/authentic2/db.conf
|
||||
|
|
|
@ -33,6 +33,18 @@ 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.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 authentic2 $@
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
reconfigure)
|
||||
|
@ -51,17 +63,6 @@ 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 authentic2 $@
|
||||
fi
|
||||
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
|
|
Loading…
Reference in New Issue