when any script in /docker-entrypoint-initdb.d/* fails the whole docker-entrypoint.sh fails but without shutting down the temporary forked mongod
|
"${mongodHackedArgs[@]}" --fork |
function shutdown {
"${mongodHackedArgs[@]}" --shutdown
rm -f "$pidfile"
}
# hook showtdown
trap shutdown EXIT
then
|
"${mongodHackedArgs[@]}" --shutdown |
rm -f "$pidfile"
# reset shutdown
trap - EXIT