mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
put correct binary name in web console
This commit is contained in:
parent
9e4b1298cc
commit
164ef1656a
@ -77,6 +77,13 @@ namespace mongo {
|
||||
boost::program_options::variables_map ¶ms ){
|
||||
|
||||
|
||||
{ // setup binary name
|
||||
cmdLine.binaryName = argv[0];
|
||||
size_t i = cmdLine.binaryName.rfind( '/' );
|
||||
if ( i != string::npos )
|
||||
cmdLine.binaryName = cmdLine.binaryName.substr( i + 1 );
|
||||
}
|
||||
|
||||
/* don't allow guessing - creates ambiguities when some options are
|
||||
* prefixes of others. allow long disguises and don't allow guessing
|
||||
* to get away with our vvvvvvv trick. */
|
||||
|
@ -24,6 +24,8 @@ namespace mongo {
|
||||
*/
|
||||
/* concurrency: OK/READ */
|
||||
struct CmdLine {
|
||||
string binaryName; // mongod or mongos
|
||||
|
||||
int port; // --port
|
||||
string bind_ip; // --bind_ip
|
||||
bool rest; // --rest
|
||||
@ -56,7 +58,7 @@ namespace mongo {
|
||||
|
||||
int pretouch; // --pretouch for replication application (experimental)
|
||||
bool moveParanoia; // for move chunk paranoia
|
||||
|
||||
|
||||
enum {
|
||||
DefaultDBPort = 27017,
|
||||
ConfigServerPort = 27019,
|
||||
|
@ -206,7 +206,7 @@ namespace mongo {
|
||||
string dbname;
|
||||
{
|
||||
stringstream z;
|
||||
z << "mongod " << prettyHostName();
|
||||
z << cmdLine.binaryName << ' ' << prettyHostName();
|
||||
dbname = z.str();
|
||||
}
|
||||
ss << start(dbname) << h2(dbname);
|
||||
|
Loading…
Reference in New Issue
Block a user