Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

start-server: Make start-server a clean explicit no-op if already running.

Alex Vandivercb097760b900
diff --git a/scripts/restart-server b/scripts/restart-server
index 324cd194179..c5333bf7836 100755
--- a/scripts/restart-server
+++ b/scripts/restart-server
@@ -115,6 +115,14 @@ if (
):
action = "start"
verbing = "Starting"
+elif action == "start":
+ existing_services = list_supervisor_processes([*workers, "zulip-django", "zulip-tornado:*"])
+ running_services = list_supervisor_processes(
+ [*workers, "zulip-django", "zulip-tornado:*"], only_running=True
+ )
+ if existing_services == running_services:
+ logging.info("Zulip is already started; nothing to do!")
+ sys.exit(0)
def restart_or_start(service: str) -> None: