1

I'm setting up mongod to run in an /etc/init.d script. This may be a nitpick, but is there a way to avoid this?

# service mongod start
Starting mongod:
forked process: 19820
all output going to /log/location/mongod.log
[SUCCESS]

Instead, I just want to see:

# service mongod start
Staring mongod:              [SUCCESS]
Brian Hicks
  • 185
  • 1
  • 8

2 Answers2

2

You might be able to change the line in your init.d script to something like this:

/path/to/mongod > /dev/null 2>/dev/null

That should suppress the output from mongod and just leave you with the output from the script. (the [SUCCESS] message)

NorbyTheGeek
  • 415
  • 1
  • 6
  • 22
0

mongod does take a --quiet flag; have you tried using that?

Andrew M.
  • 10,982
  • 2
  • 34
  • 29