diff --git a/src/freedombone-utils-mongodb b/src/freedombone-utils-mongodb index b9f87c75..481108a7 100755 --- a/src/freedombone-utils-mongodb +++ b/src/freedombone-utils-mongodb @@ -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 }