application will shutdown cleanly

This will ensure a clean shutdown when the process receives an INT or TERM signal

@ivey this change should be made to motherbrain, too.