diff options
author | Anant Prakash <anantprakashjsr@gmail.com> | 2017-04-13 17:59:34 +0530 |
---|---|---|
committer | Anant Prakash <anantprakashjsr@gmail.com> | 2017-04-13 18:00:02 +0530 |
commit | c1f52a321d010abd6a5f24da18e871a5e4b9ce12 (patch) | |
tree | d81d88caf8acf666254382fb69ec5d4b20e82aef | |
parent | Merge pull request #2115 from matrix-org/erikj/dedupe_federation_repl (diff) | |
download | synapse-c1f52a321d010abd6a5f24da18e871a5e4b9ce12.tar.xz |
synctl.py: Check if synapse is already running
-rwxr-xr-x | synapse/app/synctl.py | 3 |
1 files changed, 3 insertions, 0 deletions
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: |