perform a clean shutdown on SIGHUP and SIGTERM too