use command -v instead of test -x

This commit is contained in:
Praveen Arimbrathodiyil 2017-03-14 17:27:22 +05:30
parent 2c9069326b
commit e154dc50b8

2
debian/postrm vendored
View file

@ -60,7 +60,7 @@ case "$1" in
rm -rf ${gitlab_data_dir}
if [ ! -z "${gitlab_user}" ]; then
# Do only if gitlab_user is set
if [ -x /usr/bin/dropdb ]; then
if command -v dropdb >/dev/null; then
echo "Removing Database: gitlab_production"
su ${gitlab_user} -c 'psql gitlab_production -c ""' && su postgres -c "dropdb gitlab_production"
else