upgrade: Make calling shutdown_server twice, only try once.

This commit is contained in:
Alex Vandiver 2022-01-24 23:32:19 +00:00
parent a46f6df91e
commit da5201b986
1 changed files with 4 additions and 3 deletions

View File

@ -116,9 +116,10 @@ IS_SERVER_UP = True
def shutdown_server() -> None:
global IS_SERVER_UP
logging.info("Stopping Zulip...")
subprocess.check_call(["./scripts/stop-server"], preexec_fn=su_to_zulip)
IS_SERVER_UP = False
if IS_SERVER_UP:
logging.info("Stopping Zulip...")
subprocess.check_call(["./scripts/stop-server"], preexec_fn=su_to_zulip)
IS_SERVER_UP = False
# postgresql.version is required for database servers, but wasn't