check if db exist before dropping

This commit is contained in:
Praveen Arimbrathodiyil 2017-02-20 18:06:31 +05:30
parent 76f03adf07
commit 3da5397ff6

2
debian/postrm vendored
View file

@ -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.