From 941acdb612061190fec341a78d5741c4ee0374e2 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 2 Apr 2012 18:30:06 +0200 Subject: Fixes #2350 (reloading static resources on SIGHUP) --- src/core.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/core.py') diff --git a/src/core.py b/src/core.py index 79417c92..eb7d9e89 100644 --- a/src/core.py +++ b/src/core.py @@ -214,6 +214,21 @@ class Core(object): self.pending_invites = {} + def sighup_handler(self, num, stack): + log.debug("SIGHUP caught, reloading the files…") + # reload all log files + log.debug("Reloading the log files…") + logger.reload_all() + log.debug("Log files reloaded.") + # reload the theme + log.debug("Reloading the theme…") + self.command_theme("") + log.debug("Theme reloaded.") + # reload the config from the disk + log.debug("Reloading the config…") + config.__init__(config.file_name) + log.debug("Config reloaded.") + def autoload_plugins(self): plugins = config.get('plugins_autoload', '') for plugin in plugins.split(): -- cgit v1.2.3