Skip to content

Commit

Permalink
db.shutdownServer() in shell
Browse files Browse the repository at this point in the history
  • Loading branch information
dwight committed Feb 11, 2009
1 parent 1515ab7 commit 8154c0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions shell/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 8154c0a

Please sign in to comment.