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