From b5300f445d43b0382fcb25d9439fb1e3db9f5346 Mon Sep 17 00:00:00 2001 From: uumas Date: Tue, 18 Apr 2023 23:58:59 +0300 Subject: [PATCH] systemd unit adjustments --- .../templates/systemd/matrix-synapse-worker@.service.j2 | 5 +++-- roles/synapse/templates/systemd/matrix-synapse.service.j2 | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/roles/synapse/templates/systemd/matrix-synapse-worker@.service.j2 b/roles/synapse/templates/systemd/matrix-synapse-worker@.service.j2 index fa9b740..e9a470d 100644 --- a/roles/synapse/templates/systemd/matrix-synapse-worker@.service.j2 +++ b/roles/synapse/templates/systemd/matrix-synapse-worker@.service.j2 @@ -4,15 +4,16 @@ Description=Synapse %i AssertPathExists=/etc/matrix-synapse/workers/%i.yaml PartOf=matrix-synapse.service +ReloadPropagatedFrom=matrix-synapse.service After=matrix-synapse.service [Service] Type=notify -PIDFile=/run/matrix-synapse/%i.pid NotifyAccess=main +PIDFile=/run/matrix-synapse/%i.pid User=matrix-synapse WorkingDirectory=/var/lib/matrix-synapse -EnvironmentFile=/etc/default/matrix-synapse +EnvironmentFile=-/etc/default/matrix-synapse ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.generic_worker --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --config-path=/etc/matrix-synapse/workers/%i.yaml ExecStartPost=/bin/sh -c "echo $MAINPID > /run/matrix-synapse/%i.pid" ExecReload=/bin/kill -HUP $MAINPID diff --git a/roles/synapse/templates/systemd/matrix-synapse.service.j2 b/roles/synapse/templates/systemd/matrix-synapse.service.j2 index 2943897..77394a9 100644 --- a/roles/synapse/templates/systemd/matrix-synapse.service.j2 +++ b/roles/synapse/templates/systemd/matrix-synapse.service.j2 @@ -3,13 +3,14 @@ [Unit] Description=Synapse Matrix homeserver PartOf=matrix.target +ReloadPropagatedFrom=matrix-synapse.target [Service] Type=notify NotifyAccess=main User=matrix-synapse WorkingDirectory=/var/lib/matrix-synapse -EnvironmentFile=/etc/default/matrix-synapse +EnvironmentFile=-/etc/default/matrix-synapse ExecStartPre=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --generate-keys ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ ExecReload=/bin/kill -HUP $MAINPID