Shut down gracefully on SIGTERM.