Set syslog identifiers in systemd units (#5023)

This commit is contained in:
Christoph Müller 2019-05-10 10:09:25 +02:00 committed by Richard van der Hoff
parent b36c82576e
commit ee90c06e38
6 changed files with 14 additions and 1 deletions

3
changelog.d/5023.feature Normal file
View file

@ -0,0 +1,3 @@
Configure the example systemd units to have a log identifier of `matrix-synapse`
instead of the executable name, `python`.
Contributed by Christoph Müller.

View file

@ -12,6 +12,7 @@ ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.%i --config-path=/
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=always Restart=always
RestartSec=3 RestartSec=3
SyslogIdentifier=matrix-synapse-%i
[Install] [Install]
WantedBy=matrix-synapse.service WantedBy=matrix-synapse.service

View file

@ -11,6 +11,7 @@ ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --confi
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=always Restart=always
RestartSec=3 RestartSec=3
SyslogIdentifier=matrix-synapse
[Install] [Install]
WantedBy=matrix.target WantedBy=matrix.target

View file

@ -22,10 +22,10 @@ Group=nogroup
WorkingDirectory=/opt/synapse WorkingDirectory=/opt/synapse
ExecStart=/opt/synapse/env/bin/python -m synapse.app.homeserver --config-path=/opt/synapse/homeserver.yaml ExecStart=/opt/synapse/env/bin/python -m synapse.app.homeserver --config-path=/opt/synapse/homeserver.yaml
SyslogIdentifier=matrix-synapse
# adjust the cache factor if necessary # adjust the cache factor if necessary
# Environment=SYNAPSE_CACHE_FACTOR=2.0 # Environment=SYNAPSE_CACHE_FACTOR=2.0
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

7
debian/changelog vendored
View file

@ -1,3 +1,10 @@
matrix-synapse-py3 (0.99.3.2+nmu1) UNRELEASED; urgency=medium
[ Christoph Müller ]
* Configure the systemd units to have a log identifier of `matrix-synapse`
-- Christoph Müller <iblzm@hotmail.de> Wed, 17 Apr 2019 16:17:32 +0200
matrix-synapse-py3 (0.99.3.2) stable; urgency=medium matrix-synapse-py3 (0.99.3.2) stable; urgency=medium
* New synapse release 0.99.3.2. * New synapse release 0.99.3.2.

View file

@ -11,6 +11,7 @@ ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --confi
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=always Restart=always
RestartSec=3 RestartSec=3
SyslogIdentifier=matrix-synapse
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target