check if db exist before dropping
This commit is contained in:
parent
76f03adf07
commit
3da5397ff6
1 changed files with 1 additions and 1 deletions
2
debian/postrm
vendored
2
debian/postrm
vendored
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue