[DRE-commits] [gitlab] 04/06: check if db exist before dropping

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Feb 20 12:43:51 UTC 2017


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

praveen pushed a commit to branch master
in repository gitlab.

commit 3da5397ff62eff3b3a52a3a209b657d2441ffd5f
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Mon Feb 20 18:06:31 2017 +0530

    check if db exist before dropping
---
 debian/postrm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/postrm b/debian/postrm
index 78add48..4b4984e 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -55,7 +55,7 @@ case "$1" in
         rm -rf ${gitlab_pid_path}
         id -u ${gitlab_user} && userdel -r ${gitlab_user}
         rm -rf ${gitlab_data_dir}
-        su postgres -c "dropdb gitlab_production"
+        su ${gitlab_user} -c 'psql gitlab_production -c ""' && su postgres -c "dropdb gitlab_production"
       fi
 
       # Remove my changes to the db.

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



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