[DRE-commits] [diaspora-installer] 07/13: add conditional migration message

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Tue May 19 13:29:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch 04x-05x_update
in repository diaspora-installer.

commit 9beabd344f1a92ef27fd5d0c99be704326f06978
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Tue May 19 18:53:42 2015 +0530

    add conditional migration message
---
 debian/diaspora-common.config | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/debian/diaspora-common.config b/debian/diaspora-common.config
index 870441b..3638e1d 100644
--- a/debian/diaspora-common.config
+++ b/debian/diaspora-common.config
@@ -6,24 +6,32 @@ set -e
 # source debconf stuff
 . /usr/share/debconf/confmodule
 
-# What is your pod address?
-db_input high diaspora-common/url || true
-db_go
+# See if we run long migrations
+if test -f /tmp/flag_diaspora_db_migrations
+then
+    db_input high diaspora-common/dbbackup || true
+    db_go
+    rm -f /tmp/flag_diaspora_db_migrations
+else
+    # What is your pod address?
+    db_input high diaspora-common/url || true
+    db_go
 
-# Allow user to disable https for local testing
-db_input high diaspora-common/ssl || true
-db_go
+    # Allow user to disable https for local testing
+    db_input high diaspora-common/ssl || true
+    db_go
 
-# DB password can be left blank
-db_input high diaspora-common/dbpass || true
-db_go
+    # DB password can be left blank
+    db_input high diaspora-common/dbpass || true
+    db_go
 
-# source dbconfig-common shell library, and call the hook function
-if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
-   . /usr/share/dbconfig-common/dpkg/config.pgsql
+    # source dbconfig-common shell library, and call the hook function
+    if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
+       . /usr/share/dbconfig-common/dpkg/config.pgsql
 
-   dbc_dbname="diaspora_production"
-   dbc_dbuser="diaspora"
+       dbc_dbname="diaspora_production"
+       dbc_dbuser="diaspora"
 
-   dbc_go diaspora-common $@
+       dbc_go diaspora-common $@
+    fi
 fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora-installer.git



More information about the Pkg-ruby-extras-commits mailing list