service mongodb status || service mongodb start
mongodb: unrecognized service
service mongodb status || service mongodb start returned exit code 1
Action failed: Starting mongodb
service mongodb status || service mongodb start
mongodb: unrecognized service
mongodb: unrecognized service
service mongodb status || service mongodb start returned exit code 1
Action failed: Starting mongodb`
The build shouldn’t break just because you specify you need a service that happens to be started by default. After all what you want to say that is just that “I require this service running”. To make things worse an error message like this “mongodb: unrecognized service” just leads to further confusion. I initially thought I mistyped the name, or it’s called ‘mongo’.
What’s even more frustrating is that the behaviour is different between environments. On Ubuntu 12.04 it works, on 14.04 it doesn’t.