check if gitlab_data_dir is empty as well

This commit is contained in:
Praveen Arimbrathodiyil 2017-04-21 19:31:09 +05:30
parent 1b01da6667
commit 9a257e780b

6
debian/postrm vendored
View file

@ -58,9 +58,11 @@ case "$1" in
# Check if we should remove data?
db_get gitlab/purge_data
if [ "${RET}" = "true" ]; then
if [ -d ${gitlab_data_dir} ]; then
if [ -n "${gitlab_data_dir}" ] && [ -d ${gitlab_data_dir} ]; then
for i in shared public db repositories secrets.yml Gemfile.lock; do
if [ -e ${gitlab_data_dir}/$i ]; then rm -rf ${gitlab_data_dir}/$i; fi
if [ -e ${gitlab_data_dir}/$i ]; then
echo "Removing: ${gitlab_data_dir}/$i"
rm -rf ${gitlab_data_dir}/$i; fi
done
fi
for i in ${gitlab_log_dir} ${gitlab_cache_path} ${gitlab_pid_path} \