Browse Source

More attempts to remove mongodb

Bob Mottram 7 years ago
parent
commit
b523cd120f
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/freedombone-utils-mongodb

+ 5
- 0
src/freedombone-utils-mongodb View File

@@ -111,6 +111,8 @@ function remove_mongodb {
111 111
     fi
112 112
 
113 113
     if [ $removemongo ]; then
114
+        systemctl stop mongodb
115
+        systemctl disable mongodb
114 116
         apt-get -yq remove mongodb mongo-tools
115 117
         apt-get -yq autoremove
116 118
         if [ -d /var/lib/mongodb ]; then
@@ -120,6 +122,9 @@ function remove_mongodb {
120 122
             rm /etc/systemd/system/mongodb.service
121 123
             systemctl daemon-reload
122 124
         fi
125
+        if [ -f /etc/init.d/mongodb ]; then
126
+            rm /etc/init.d/mongodb
127
+        fi
123 128
     fi
124 129
 }
125 130