|
@@ -103,8 +103,7 @@ function remove_mongodb {
|
103
|
103
|
removemongo=
|
104
|
104
|
if [ -f $MONGODB_APPS_FILE ]; then
|
105
|
105
|
sed -i "/$app_name/d" $MONGODB_APPS_FILE
|
106
|
|
- mongoapps=$(cat $MONGODB_APPS_FILE)
|
107
|
|
- if [ ${#mongoapps} -lt 3 ]; then
|
|
106
|
+ if [ ! -s $MONGODB_APPS_FILE ]; then
|
108
|
107
|
removemongo=1
|
109
|
108
|
fi
|
110
|
109
|
else
|
|
@@ -113,6 +112,7 @@ function remove_mongodb {
|
113
|
112
|
|
114
|
113
|
if [ $removemongo ]; then
|
115
|
114
|
apt-get -yq remove mongodb mongo-tools
|
|
115
|
+ apt-get -yq autoremove
|
116
|
116
|
if [ -d /var/lib/mongodb ]; then
|
117
|
117
|
rm -rf /var/lib/mongodb
|
118
|
118
|
fi
|