From 6395dc1a45c9a0e2c05ad373ac2fd2450d146e42 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 5 Oct 2017 12:21:08 -0700 Subject: [PATCH] zephyr_mirror: Update process_cache for repository move. This also has the side effect of stopping using the --root-path argument, which should no longer be required. --- zulip/integrations/zephyr/process_ccache | 3 ++- zulip/integrations/zephyr/zmirror_private.conf.template | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zulip/integrations/zephyr/process_ccache b/zulip/integrations/zephyr/process_ccache index 0badf2d..51cf78f 100755 --- a/zulip/integrations/zephyr/process_ccache +++ b/zulip/integrations/zephyr/process_ccache @@ -1,4 +1,5 @@ #!/usr/bin/env python +import os import sys import subprocess import base64 @@ -18,7 +19,7 @@ open(api_key_path, "w").write(api_key + "\n") # Setup supervisord configuration supervisor_path = "/etc/supervisor/conf.d/%s.conf" % (program_name,) -template = "/home/zulip/zulip/api/integrations/zephyr/zmirror_private.conf.template" +template = os.path.join(os.path.dirname(__file__), "zmirror_private.conf.template") template_data = open(template).read() session_path = "/home/zulip/zephyr_sessions/%s" % (program_name,) diff --git a/zulip/integrations/zephyr/zmirror_private.conf.template b/zulip/integrations/zephyr/zmirror_private.conf.template index 83545e3..1ebf70c 100644 --- a/zulip/integrations/zephyr/zmirror_private.conf.template +++ b/zulip/integrations/zephyr/zmirror_private.conf.template @@ -1,5 +1,5 @@ [program:zmirror-USERNAME] -command=/home/zulip/zulip/api/integrations/zephyr/zephyr_mirror_backend.py --root-path=/home/zulip/zulip --user=USERNAME --log-path=/home/zulip/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/zulip/zephyr_sessions/%(program_name)s --api-key-file=/home/zulip/api-keys/%(program_name)s --ignore-expired-tickets --nagios-path=/home/zulip/mirror_status/%(program_name)s --nagios-class=zulip-mirror-nagios --site=https://zephyr.zulipchat.com +command=/home/zulip/python-zulip-api/zulip/integrations/zephyr/zephyr_mirror_backend.py --user=USERNAME --log-path=/home/zulip/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/zulip/zephyr_sessions/%(program_name)s --api-key-file=/home/zulip/api-keys/%(program_name)s --ignore-expired-tickets --nagios-path=/home/zulip/mirror_status/%(program_name)s --nagios-class=zulip-mirror-nagios --site=https://zephyr.zulipchat.com priority=200 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected)