From 91a757c5811c11552b6a466e47556d6673fed730 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 6 Feb 2019 09:25:13 +0200 Subject: [PATCH] Add support for reloading Synapse --- docs/howto-server-delegation.md | 3 ++- .../templates/synapse/systemd/matrix-synapse.service.j2 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/howto-server-delegation.md b/docs/howto-server-delegation.md index dae7c6cf0..fd151eb1f 100644 --- a/docs/howto-server-delegation.md +++ b/docs/howto-server-delegation.md @@ -135,4 +135,5 @@ matrix_synapse_tls_certificate_path: /some/path/inside/the/container/certificate matrix_synapse_tls_private_key_path: /some/path/inside/the/container/private.key ``` -Every once in a while (before the certificates expire), you'll need to completely restart Synapse (unless [Synapse becomes capable of reloading certificates without restarting - issue #1180](https://github.com/matrix-org/synapse/issues/1180)). Restarting Synapse can be done like this: `systemctl restart matrix-synapse`. Restarting causes some downtime. +Make sure to reload Synapse once in a while (`systemctl reload matrix-synapse`), so that newer certificates can kick in. +Reloading doesn't cause any downtime. diff --git a/roles/matrix-synapse/templates/synapse/systemd/matrix-synapse.service.j2 b/roles/matrix-synapse/templates/synapse/systemd/matrix-synapse.service.j2 index 9d12d5f35..f11e99d49 100644 --- a/roles/matrix-synapse/templates/synapse/systemd/matrix-synapse.service.j2 +++ b/roles/matrix-synapse/templates/synapse/systemd/matrix-synapse.service.j2 @@ -51,6 +51,7 @@ ExecStart=/usr/bin/docker run --rm --name matrix-synapse \ ExecStop=-/usr/bin/docker kill matrix-synapse ExecStop=-/usr/bin/docker rm matrix-synapse +ExecReload=/usr/bin/docker exec matrix-synapse kill -HUP 1 Restart=always RestartSec=30