signal handler for SIGTERM (for supervisord)