From b21b0557e8cf70c6262d9612aa7f9432980c6bf0 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 1 Oct 2013 13:45:29 -0400 Subject: [PATCH] zephyr_mirror: Fix support for forwarding mail zephyrs. (imported from commit 4ab2c810d3ccff6058e6c0be2e172a78e216d0a5) --- bots/process_ccache | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bots/process_ccache b/bots/process_ccache index 57e0ed3..62244e7 100755 --- a/bots/process_ccache +++ b/bots/process_ccache @@ -22,6 +22,14 @@ supervisor_path = "/etc/supervisor/conf.d/%s.conf" % (program_name,) template = "/home/humbug/humbug/bots/zmirror_private.conf.template" template_data = file(template).read() session_path = "/home/humbug/zephyr_sessions/%s" % (program_name,) + +# Preserve mail zephyrs forwarding setting across rewriting the config file + +try: + if "--forward-mail-zephyrs" in file(supervisor_path, "r").read(): + template_data = template_data.replace("--use-sessions", "--use-sessions --forward-mail-zephyrs") +except Exception: + pass file(supervisor_path, "w").write(template_data.replace("USERNAME", short_user)) # Delete your session