Trap signal to exit the webserver properly