cli: Exit cleanly on SIGTERM, SIGINT, and SIGQUIT