Commit 7071a253 authored by Praveen Arimbrathodiyil's avatar Praveen Arimbrathodiyil
Browse files

add more checks before removing

parent f770be9f
......@@ -52,15 +52,18 @@ case "$1" in
ucf --purge /etc/dbconfig-common/diaspora-common.conf
ucfr --purge diaspora-common /etc/dbconfig-common/diaspora-common.conf
fi
rm -rf ${diaspora_user_home}/public
rm -rf ${diaspora_user_home}/app-assets
rm -rf ${diaspora_user_home}/Gemfile.lock
rm -rf ${diaspora_user_home}/.bundle
rm -rf ${diaspora_user_home}/vendor
rm -rf ${diaspora_home}/app/assets
rm -rf ${diaspora_home}/db
rm -rf ${diaspora_home}/bin
rm -rf /var/cache/diaspora /var/log/diaspora
diaspora_user_home=/var/lib/diaspora
if [ -d ${diaspora_user_home} ]; then
for i in public app-assets Gemfile.lock .bundle vendor; do
test -e ${diaspora_user_home}/$i && rm -rf ${diaspora_user_home}/$i
done
fi
diaspora_home=/usr/share/diaspora
if [ -d ${diaspora_home} ]; then
for i in db bin app/assets; do
test -e ${diaspora_home}/$i && rm -rf ${diaspora_home}/$i
done
fi
echo "Removing user: diaspora"
id -u diaspora && userdel -r diaspora
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment