I running mongodb instance from bash scripts and I need to show user-friendly message if mogngo will crash during startup for some reason.
so I have that sort of code
eval 'mongod --dbpath=$ABS_MONGO_DATA_PATH &' || printf "something bad happened"
but with that sort of notation error handler never called. But if I remove &
sing, then after mongo initialization further script do not running because of mongod process waiting for a signals
How could I resolve that issue?