Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
860 B

[Unit]
Description=Synapse Matrix homeserver
[Service]
Type=simple
User={{ synapse_user }}
Group={{ synapse_user }}
Environment=LD_PRELOAD=/usr/lib64/libjemalloc.so.1
{% 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