upgrade-zulip: Restart process-fts-updates if also a DB host.

Previoulsy, process-fts-updates wouldn't be restarted on a server
upgrade in Voyager configurations.
This commit is contained in:
Tim Abbott 2016-01-09 15:05:13 -08:00
parent 75b5a1b8da
commit e7353902df
1 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,9 @@ logging.info("Upgrading system packages...")
subprocess.check_call(["apt-get", "update"]) subprocess.check_call(["apt-get", "update"])
subprocess.check_call(["apt-get", "upgrade"]) 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...") logging.info("Stopping Zulip...")
subprocess.check_call(["supervisorctl", "stop", "zulip-workers:*", "zulip-django", subprocess.check_call(["supervisorctl", "stop", "zulip-workers:*", "zulip-django",
"zulip-tornado", "zulip-senders:*"], preexec_fn=su_to_zulip) "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'), subprocess.check_call(["cp", "-rT", os.path.join(deploy_path, 'prod-static/serve'),
'/home/zulip/prod-static'], preexec_fn=su_to_zulip) '/home/zulip/prod-static'], preexec_fn=su_to_zulip)
subprocess.check_output(["./scripts/restart-server"], 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)