diff --git a/scripts/remove b/scripts/remove index c292a7c..a4648c0 100644 --- a/scripts/remove +++ b/scripts/remove @@ -45,10 +45,11 @@ fi # REMOVE THE MONGO DATABASE #================================================= +mongo --shell "$dbname" --eval 'db.dropUser("$dbuser", {w: "majority", wtimeout: 5000})' <<< exit #mongo -u $dbuser -p$dbpass --authenticationDatabase $dbname --shell "$dbname" --eval 'db.dropUser('dbuser');' <<< exit -mongo --shell "$dbname" --eval 'db.runCommand({dropDatabase: 1});' <<< exit +mongo --shell "$dbname" --eval 'db.runCommand({dropDatabase: 1})' <<< exit #mongo -u $dbuser -p$dbpass --authenticationDatabase $dbname --shell "$dbname" --eval 'db.dropDatabase();' <<< exit -#mongo --shell "$dbname" --eval 'db.dropDatabase();' <<< exit + #================================================= # REMOVE DEPENDENCIES