thanpolas/grunt-services — pull request #1 by bryanlester (2014-04-25 01:57:35+00:00)
Title: Fix for Linux users running mongodb via services

MongoDB is started on most Linux distributions with:

$ sudo service mongod start

This causes the process to be owned by the user 'mongodb'. The ps command you're using is restricted to processes owned by the current user. So, it doesn't detect mongodb's process and tries to start mongod anyway, which fails.

Adding an 'a' flag will cause it to return processes of other users as well. That will allow the task to recognize that mongodb is already running at the service level and not mess with it.