From c1f52a321d010abd6a5f24da18e871a5e4b9ce12 Mon Sep 17 00:00:00 2001 From: Anant Prakash Date: Thu, 13 Apr 2017 17:59:34 +0530 Subject: synctl.py: Check if synapse is already running --- synapse/app/synctl.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'synapse') diff --git a/synapse/app/synctl.py b/synapse/app/synctl.py index 8223734845..3bd7ef7bba 100755 --- a/synapse/app/synctl.py +++ b/synapse/app/synctl.py @@ -234,6 +234,9 @@ def main(): if action == "start" or action == "restart": if start_stop_synapse: + # Check if synapse is already running + if os.path.exists(pidfile) and pid_running(int(open(pidfile).read())): + abort("synapse.app.homeserver already running") start(configfile) for worker in workers: -- cgit 1.4.1