import datetime
import socket
import textwrap
+import signal
# Third party modules
import pytz
from fb_tools.errors import HandlerError, ExpectedHandlerError, CommandNotFoundError
from fb_tools.errors import TerraformVmError, TerraformVmDefinitionError, NetworkNotExistingError
from fb_tools.errors import CannotConnectVsphereError, NoDatastoreFoundError
+from fb_tools.errors import InterruptError
from fb_tools.handler import BaseHandler
retval = 0
try:
+
+ signal.signal(signal.SIGHUP, self.signal_handler)
+ signal.signal(signal.SIGINT, self.signal_handler)
+ signal.signal(signal.SIGABRT, self.signal_handler)
+ signal.signal(signal.SIGTERM, self.signal_handler)
+ signal.signal(signal.SIGUSR1, self.signal_handler)
+ signal.signal(signal.SIGUSR2, self.signal_handler)
+
retval = self.run()
+
finally:
# Aufräumen ...
self.cluster = None