diff options
author | Aaron <aaron@10gen.com> | 2009-04-02 17:58:09 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-04-02 17:58:09 -0400 |
commit | 9c2ce6c85581e4b3a8271b65cd5be9c0d59f2e4c (patch) | |
tree | cdf59a34c7a7a7fdcb1cc71b8427a496d1a6ee06 | |
parent | 4dd56647881f3d16600e5e69a37c440f7ea001f4 (diff) | |
download | mongo-9c2ce6c85581e4b3a8271b65cd5be9c0d59f2e4c.tar.gz |
option to run without http interface
-rw-r--r-- | db/db.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/db/db.cpp b/db/db.cpp index b22ee276518..0d0964ce2b9 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -40,6 +40,8 @@ namespace mongo { /* only off if --nohints */ extern bool useHints; + bool noHttpInterface = false; + extern int port; extern int curOp; extern bool autoresync; @@ -135,7 +137,8 @@ namespace mongo { log() << "waiting for connections on port " << port << endl; OurListener l(port); startReplication(); - boost::thread thr(webServerThread); + if ( !noHttpInterface ) + boost::thread thr(webServerThread); if ( l.init() ) { registerListenerSocket( l.socket() ); l.listen(); @@ -554,6 +557,8 @@ int main(int argc, char* argv[], char *envp[] ) useCursors = false; else if ( s == "--nohints" ) useHints = false; + else if ( s == "--nohttpinterface" ) + noHttpInterface = true; else if ( s == "--oplogSize" ) { long x = strtol( argv[ ++i ], 0, 10 ); uassert("bad arg", x > 0); @@ -602,6 +607,7 @@ usage: out() << " --appsrvpath <path> root directory for the babble app server\n"; out() << " --nocursors diagnostic/debugging option\n"; out() << " --nohints ignore query hints\n"; + out() << " --nohttpinterface disable http interface\n"; out() << " --nojni" << endl; out() << " --oplog<n> 0=off 1=W 2=R 3=both 7=W+some reads" << endl; out() << " --oplogSize <size_in_MB> custom size if creating new replication operation log" << endl; |