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
     fi
111
     fi
112
 
112
 
113
     if [ $removemongo ]; then
113
     if [ $removemongo ]; then
114
+        systemctl stop mongodb
115
+        systemctl disable mongodb
114
         apt-get -yq remove mongodb mongo-tools
116
         apt-get -yq remove mongodb mongo-tools
115
         apt-get -yq autoremove
117
         apt-get -yq autoremove
116
         if [ -d /var/lib/mongodb ]; then
118
         if [ -d /var/lib/mongodb ]; then
120
             rm /etc/systemd/system/mongodb.service
122
             rm /etc/systemd/system/mongodb.service
121
             systemctl daemon-reload
123
             systemctl daemon-reload
122
         fi
124
         fi
125
+        if [ -f /etc/init.d/mongodb ]; then
126
+            rm /etc/init.d/mongodb
127
+        fi
123
     fi
128
     fi
124
 }
129
 }
125
 
130