summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-02-11 09:35:11 -0500
committerEliot Horowitz <eliot@10gen.com>2009-02-11 09:35:11 -0500
commitbdc7d90b852ec294995f16afcc48c0238db789aa (patch)
treeed4fe23ce656ec06401aabc2931df9fed2d87ccb
parent3ae8e9440c991bd4642a2074db83b05129a3e966 (diff)
parent6a7ce4dd637686f3ce446c0f4051795bba91313e (diff)
downloadmongo-bdc7d90b852ec294995f16afcc48c0238db789aa.tar.gz
Merge branch 'master' of git.10gen.com:/data/gitroot/p
-rw-r--r--shell/db.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/shell/db.js b/shell/db.js
index 5ecb5174625..4fd0f456cc7 100644
--- a/shell/db.js
+++ b/shell/db.js
@@ -114,6 +114,12 @@ DB.prototype.dropDatabase = function() {
}
+DB.prototype.shutdownServer = function() {
+ if( "admin" != db )
+ return "shutdown command only works with the admin database; try 'use admin'";
+ return this._dbCommand("shutdown");
+}
+
/**
Clone database on another server to here.
<p>
@@ -189,6 +195,7 @@ DB.prototype.help = function() {
print("\tdb.setProfilingLevel(level) 0=off 1=slow 2=all");
print("\tdb.cloneDatabase(fromhost)");
print("\tdb.copyDatabase(fromdb, todb, fromhost)");
+ print("\tdb.shutdownServer()");
print("\tdb.dropDatabase()");
print("\tdb.repairDatabase()");
print("\tdb.eval(func, args) run code server-side");