2020-04-05 09:38:31 +00:00
|
|
|
files = {
|
|
|
|
'/etc/matrix-synapse/homeserver.yaml': {
|
|
|
|
'content_type': 'mako',
|
2023-08-23 15:25:41 +00:00
|
|
|
'context': node.metadata.get('matrix-synapse'),
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:matrix-synapse-py3',
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:matrix-synapse:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/matrix-synapse/log.yaml': {
|
2020-04-05 09:38:31 +00:00
|
|
|
'needs': {
|
|
|
|
'pkg_apt:matrix-synapse-py3',
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:matrix-synapse:restart',
|
|
|
|
},
|
|
|
|
},
|
2021-02-19 10:56:21 +00:00
|
|
|
'/etc/matrix-synapse/scripts/synapse-purge-unused-rooms': {
|
|
|
|
'mode': '0755',
|
|
|
|
},
|
2023-03-19 14:43:09 +00:00
|
|
|
'/etc/matrix-synapse/scripts/synapse-reset-federation-timeout': {
|
|
|
|
'mode': '0755',
|
|
|
|
},
|
2020-09-05 18:06:35 +00:00
|
|
|
'/etc/systemd/system/matrix-synapse.service.d/override.conf': {
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:matrix-synapse-py3',
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
'action:systemd-reload',
|
|
|
|
'svc_systemd:matrix-synapse:restart',
|
|
|
|
},
|
|
|
|
},
|
2021-07-17 07:32:49 +00:00
|
|
|
'/etc/matrix-synapse/conf.d/server_name.yaml': {
|
|
|
|
# We don't actually need this file. However, if we don't put the
|
|
|
|
# server name in there, synapse will somehow remove it from
|
|
|
|
# homeserver.yaml when installing a new matrix-synapse package.
|
|
|
|
# Our override.conf ensures this file is never read, so we don't
|
|
|
|
# need to restart synapse after changing stuff in here.
|
|
|
|
'content_type': 'mako',
|
2023-08-23 15:25:41 +00:00
|
|
|
'context': node.metadata.get('matrix-synapse'),
|
2021-07-17 07:32:49 +00:00
|
|
|
},
|
|
|
|
'/etc/matrix-synapse/conf.d/report_stats.yaml': {
|
|
|
|
# see comment above
|
|
|
|
},
|
2020-04-05 09:38:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
svc_systemd = {
|
|
|
|
'matrix-synapse': {
|
|
|
|
'needs': {
|
|
|
|
'file:/etc/matrix-synapse/homeserver.yaml',
|
2023-08-23 15:25:41 +00:00
|
|
|
'file:/etc/matrix-synapse/log.yaml',
|
2020-09-05 18:06:35 +00:00
|
|
|
'file:/etc/systemd/system/matrix-synapse.service.d/override.conf',
|
2020-04-05 09:38:31 +00:00
|
|
|
'pkg_apt:matrix-synapse-py3',
|
2021-05-14 18:03:56 +00:00
|
|
|
'postgres_db:synapse',
|
2020-04-05 09:38:31 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2024-03-17 17:32:28 +00:00
|
|
|
|
|
|
|
if node.metadata.get('matrix-synapse/sliding_sync/version', None):
|
|
|
|
files['/usr/local/bin/matrix-sliding-sync'] = {
|
|
|
|
'content_type': 'download',
|
|
|
|
'source': 'https://github.com/matrix-org/sliding-sync/releases/download/{}/syncv3_linux_amd64'.format(
|
|
|
|
node.metadata.get('matrix-synapse/sliding_sync/version'),
|
|
|
|
),
|
|
|
|
'content_hash': node.metadata.get('matrix-synapse/sliding_sync/sha1', None),
|
|
|
|
'mode': '0755',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:matrix-sliding-sync:restart',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files['/usr/local/lib/systemd/system/matrix-sliding-sync.service'] = {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'action:systemd-reload',
|
|
|
|
'svc_systemd:matrix-sliding-sync:restart',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
svc_systemd['matrix-sliding-sync'] = {
|
|
|
|
'needs': {
|
|
|
|
'file:/usr/local/bin/matrix-sliding-sync',
|
|
|
|
'file:/usr/local/lib/systemd/system/matrix-sliding-sync.service',
|
2024-03-23 09:35:02 +00:00
|
|
|
'postgres_db:synapse',
|
2024-03-17 17:32:28 +00:00
|
|
|
},
|
|
|
|
}
|