diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2 index 54fd5124f4..12294309cf 100755 --- a/scripts/lib/upgrade-zulip-stage-2 +++ b/scripts/lib/upgrade-zulip-stage-2 @@ -26,6 +26,9 @@ logging.info("Upgrading system packages...") subprocess.check_call(["apt-get", "update"]) subprocess.check_call(["apt-get", "upgrade"]) +if os.path.exists("/etc/supervisor/conf.d/zulip_db.conf"): + subprocess.check_call(["supervisorctl", "stop", "process-fts-updates"], preexec_fn=su_to_zulip) + logging.info("Stopping Zulip...") subprocess.check_call(["supervisorctl", "stop", "zulip-workers:*", "zulip-django", "zulip-tornado", "zulip-senders:*"], preexec_fn=su_to_zulip) @@ -41,3 +44,6 @@ logging.info("Restarting Zulip...") subprocess.check_call(["cp", "-rT", os.path.join(deploy_path, 'prod-static/serve'), '/home/zulip/prod-static'], preexec_fn=su_to_zulip) subprocess.check_output(["./scripts/restart-server"], preexec_fn=su_to_zulip) + +if os.path.exists("/etc/supervisor/conf.d/zulip_db.conf"): + subprocess.check_call(["supervisorctl", "start", "process-fts-updates"], preexec_fn=su_to_zulip)