Esempio n. 1
0
def shutdown_servers(signum, frame):
    plugins_dict = hpotter.plugins.__dict__
    for plugin_name in plugins_dict['__all__']:
        importlib.import_module('hpotter.plugins.' + plugin_name)
        plugin = plugins_dict[plugin_name]
        logger.info('Stopping %s', plugin_name)
        plugin.stop_server()
        logger.info('Done stopping %s', plugin_name)

    # shell might have been started by telnet, ssh, ...
    stop_shell()
Esempio n. 2
0
def shutdown_servers(signum, frame):
    for plugin_name in plugins_dict['__all__']:
        importlib.import_module('hpotter.plugins.' + plugin_name)
        plugin = plugins_dict[plugin_name]
        logger.info('Stopping %s', plugin_name)
        plugin.stop_server()
        logger.info('Done stopping %s', plugin_name)

    # shell might have been started by telnet, ssh, ...
    stop_shell()
    close_db()
Esempio n. 3
0
def shutdown_win_servers(signum):
    """
    Shutdown HPotter servers (Windows).

    Provide a method for shutting down servers that can be parsed by win32api.
    
    Parameters:
        signum (int): Signal received by HPotter.
    """
    stop_plugins()
    stop_shell()
    close_db()
Esempio n. 4
0
def shutdown_servers(signum, frame):
    """
    Shutdown HPotter servers.

    Stop all running plugins, shutdown docker shell, close SQLite database.
    
    Parameters:
        signum (int): Signal received by HPotter.
        frame (frame object): Stack frame interrupted by given signum.
    """
    stop_plugins()
    stop_shell()
    close_db()
Esempio n. 5
0
 def tearDown(self):
     stop_shell()
Esempio n. 6
0
 def tearDown(self):
     stop_shell()
     close_db()
     stop_server()
Esempio n. 7
0
 def tearDown(self):
     stop_shell()