Adding Signal handlers with support for SIGTERM (shutdown procedure) and SIGHUP (restart)