More attempts to remove mongodb

This commit is contained in:
Bob Mottram 2017-11-23 19:49:57 +00:00
parent 33de19cd99
commit b523cd120f
1 changed files with 5 additions and 0 deletions

View File

@ -111,6 +111,8 @@ function remove_mongodb {
fi
if [ $removemongo ]; then
systemctl stop mongodb
systemctl disable mongodb
apt-get -yq remove mongodb mongo-tools
apt-get -yq autoremove
if [ -d /var/lib/mongodb ]; then
@ -120,6 +122,9 @@ function remove_mongodb {
rm /etc/systemd/system/mongodb.service
systemctl daemon-reload
fi
if [ -f /etc/init.d/mongodb ]; then
rm /etc/init.d/mongodb
fi
fi
}