mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-06 16:46:54 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
29
roles/matrix_synapse/templates/matrix-synapse.service.j2
Normal file
29
roles/matrix_synapse/templates/matrix-synapse.service.j2
Normal file
@@ -0,0 +1,29 @@
|
||||
[Unit]
|
||||
Description=Synapse Matrix homeserver
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ synapse_user }}
|
||||
Group={{ synapse_user }}
|
||||
Environment=LD_PRELOAD={{ synapse_jemalloc }}
|
||||
{% if system_proxy is defined and system_proxy != '' %}
|
||||
{% for env in ['http_proxy', 'https_proxy', 'HTTP_PROXY', 'HTTPS_PROXY'] %}
|
||||
Environment={{ env }}={{ system_proxy | urlsplit('hostname') }}:{{ system_proxy | urlsplit('port') }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
PermissionsStartOnly=yes
|
||||
ExecStart={{ synapse_root_dir }}/venv/bin/python3 -m synapse.app.homeserver -c {{ synapse_root_dir }}/etc/homeserver.yaml -n
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=full
|
||||
ProtectHome=yes
|
||||
NoNewPrivileges=yes
|
||||
MemoryLimit={{ synapse_max_mem }}M
|
||||
SyslogIdentifier=matrix-synapse
|
||||
Restart=on-failure
|
||||
StartLimitInterval=0
|
||||
RestartSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user