mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2025-03-04 22:57:13 +00:00
Template the systemd file
This commit is contained in:
parent
f6e9b7ce22
commit
82e1d23527
3 changed files with 18 additions and 18 deletions
|
@ -1,16 +0,0 @@
|
|||
[Unit]
|
||||
Description="Matrix Synapse Server (synapse)"
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/synapse
|
||||
ExecStart=/opt/synapse/env/bin/python -m synapse.app.homeserver --config-path=/opt/synapse/homeserver.yaml --log-config=/opt/synapse/log.config
|
||||
ExecStop=/opt/synapse/env/bin/synctl stop /opt/synapse/homeserver.yaml
|
||||
User=synapse
|
||||
Group=synapse
|
||||
Restart=always
|
||||
StandardOutput=syslog
|
||||
SyslogIdentifier=matrix_synapse
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: Deploy service file
|
||||
copy:
|
||||
src: "matrix-synapse.service"
|
||||
template:
|
||||
src: "matrix-synapse.service.j2"
|
||||
dest: "/etc/systemd/system/matrix-synapse.service"
|
||||
notify:
|
||||
- "reload systemd"
|
||||
|
|
16
templates/matrix-synapse.service.j2
Normal file
16
templates/matrix-synapse.service.j2
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description="Matrix Synapse Server (synapse)"
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory={{ matrix_synapse_base_path }}
|
||||
ExecStart={{ matrix_synapse_base_path }}/env/bin/python -m synapse.app.homeserver --config-path={{ matrix_synapse_base_path }}/homeserver.yaml --log-config={{ matrix_synapse_base_path }}/log.config
|
||||
ExecStop={{ matrix_synapse_base_path }}/env/bin/synctl stop {{ matrix_synapse_base_path }}/homeserver.yaml
|
||||
User=synapse
|
||||
Group=synapse
|
||||
Restart=always
|
||||
StandardOutput=syslog
|
||||
SyslogIdentifier=matrix_synapse
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
Loading…
Add table
Reference in a new issue