From 9f05ae47d104864162f264fe6415d73797e039bd Mon Sep 17 00:00:00 2001 From: Bruno Cesar Ribas Date: Thu, 23 Aug 2018 23:25:23 -0300 Subject: d/boca-{common,db}.postinst: Avoid asking same question on upgrade From now on the user must remove lines containing 'bdserver' or 'bdcreated in /etc/boca.conf in order to modify the DB password and the DB hostname. Signed-off-by: Bruno Cesar Ribas --- debian/boca-db.postinst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'debian/boca-db.postinst') diff --git a/debian/boca-db.postinst b/debian/boca-db.postinst index 8a36f55..c4215df 100644 --- a/debian/boca-db.postinst +++ b/debian/boca-db.postinst @@ -9,6 +9,14 @@ priority=high case "$1" in configure|reconfigure) + if [[ -e "/etc/boca.conf" ]]; then + . /etc/boca.conf + if [[ "$bdcreated" != "" ]]; then + echo "If you want to reset DB configuration, please unset \"bdcreated\" in /etc/boca.conf" + exit 0 + fi + fi + #Assume DBHOST will be localhost, since this is the package that #provides postgresql #XXX future work make it work as a backup DB server @@ -53,6 +61,7 @@ case "$1" in if [[ "$RET" == "Yes" ]]; then echo YES |php /var/www/boca/src/private/createdb.php + echo "bdcreated=y" >> /etc/boca.conf fi db_reset boca-db/createdb -- cgit v1.2.3