diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2 index 6aa0eae22a..4061ba9900 100755 --- a/scripts/lib/upgrade-zulip-stage-2 +++ b/scripts/lib/upgrade-zulip-stage-2 @@ -39,8 +39,3 @@ 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) - -using_sso = subprocess.check_output(['./bin/get-django-setting', 'USING_SSO'], preexec_fn=su_to_zulip) -if using_sso: - logging.info("Restarting Apache...") - subprocess.check_call(["service", "apache2", "restart"]) diff --git a/scripts/restart-server b/scripts/restart-server index 578d19c046..acc17a359e 100755 --- a/scripts/restart-server +++ b/scripts/restart-server @@ -31,5 +31,10 @@ subprocess.check_call(["supervisorctl", "stop", "zulip-workers:* zulip-django zu subprocess.check_call(["ln", '-nsf', deploy_path, os.path.join(DEPLOYMENTS_DIR, "current")]) subprocess.check_call(["supervisorctl", "start", "zulip-tornado zulip-django zulip-workers:*"]) +using_sso = subprocess.check_output(['./bin/get-django-setting', 'USING_SSO']) +if using_sso.strip() == 'True': + logging.info("Restarting Apache WSGI process...") + subprocess.check_call(["pkill", "-f", "apache2", "-u", "zulip"]) + logging.info("Done!") print OKGREEN + "Application restarted successfully!" + ENDC