check if gitlab_data_dir is empty as well
This commit is contained in:
parent
1b01da6667
commit
9a257e780b
1 changed files with 4 additions and 2 deletions
6
debian/postrm
vendored
6
debian/postrm
vendored
|
@ -58,9 +58,11 @@ case "$1" in
|
||||||
# Check if we should remove data?
|
# Check if we should remove data?
|
||||||
db_get gitlab/purge_data
|
db_get gitlab/purge_data
|
||||||
if [ "${RET}" = "true" ]; then
|
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
|
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
|
done
|
||||||
fi
|
fi
|
||||||
for i in ${gitlab_log_dir} ${gitlab_cache_path} ${gitlab_pid_path} \
|
for i in ${gitlab_log_dir} ${gitlab_cache_path} ${gitlab_pid_path} \
|
||||||
|
|
Loading…
Reference in a new issue