[Unit]
Description=Synapse Matrix worker (%i)
BindsTo=synapse.service
After=synapse.service
ReloadPropagatedFrom=synapse.service
AssertPathExists=/etc/synapse/worker-%i.yaml

[Service]
Type=notify
NotifyAccess=main
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-abort

User=synapse

WorkingDirectory=~
ExecStart=/var/lib/synapse/venv/bin/python -m synapse.app.generic_worker --config-path=/etc/synapse/homeserver.yaml --config-path=/etc/synapse/worker-%i.yaml
SyslogIdentifier=synapse

Environment=LD_PRELOAD=/usr/lib/libjemalloc.so

[Install]
RequiredBy=synapse.service

# vim:set ft=systemd:
