diff options
| -rw-r--r-- | debian/boca-common.postinst | 7 | ||||
| -rw-r--r-- | debian/boca-db.postinst | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/debian/boca-common.postinst b/debian/boca-common.postinst index f6c61cd..d28de8a 100644 --- a/debian/boca-common.postinst +++ b/debian/boca-common.postinst @@ -8,6 +8,13 @@ priority=high case "$1" in configure|reconfigure) + if [[ -e "/etc/boca.conf" ]]; then + . /etc/boca.conf + if [[ "$bdserver" != "" ]]; then + echo "If you want to reset DB configuration, please unset \"bdserver\" in /etc/boca.conf" + exit 0 + fi + fi db_input high boca-common/dbhost || true db_go || true 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 |