2020-12-31 11:18:34 +00:00
|
|
|
users = {
|
|
|
|
'mautrix-whatsapp': {
|
|
|
|
'home': '/opt/mautrix-whatsapp',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
directories = {
|
2021-07-23 05:58:15 +00:00
|
|
|
'/opt/mautrix-whatsapp': {},
|
2020-12-31 11:18:34 +00:00
|
|
|
'/opt/mautrix-whatsapp/logs': {
|
|
|
|
'owner': 'mautrix-whatsapp',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
svc_systemd = {
|
|
|
|
'mautrix-whatsapp': {
|
|
|
|
'needs': {
|
|
|
|
'directory:/opt/mautrix-whatsapp/logs',
|
|
|
|
'file:/etc/systemd/system/mautrix-whatsapp.service',
|
|
|
|
'file:/opt/mautrix-whatsapp/config.yaml',
|
2021-11-09 16:57:52 +00:00
|
|
|
'file:/opt/mautrix-whatsapp/mautrix-whatsapp',
|
2020-12-31 11:18:34 +00:00
|
|
|
'postgres_db:mautrix-whatsapp',
|
|
|
|
'postgres_role:mautrix-whatsapp',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files = {
|
|
|
|
'/opt/mautrix-whatsapp/registration.yaml': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:mautrix-whatsapp:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/opt/mautrix-whatsapp/config.yaml': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:mautrix-whatsapp:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/systemd/system/mautrix-whatsapp.service': {
|
|
|
|
'triggers': {
|
|
|
|
'action:systemd-reload',
|
|
|
|
'svc_systemd:mautrix-whatsapp:restart',
|
|
|
|
},
|
|
|
|
},
|
2021-11-09 16:57:52 +00:00
|
|
|
'/opt/mautrix-whatsapp/mautrix-whatsapp': {
|
|
|
|
'content_hash': node.metadata.get('mautrix-whatsapp/sha1', None),
|
|
|
|
'content_type': 'download',
|
|
|
|
'mode': '0755',
|
|
|
|
'source': 'https://github.com/mautrix/whatsapp/releases/download/{}/mautrix-whatsapp-amd64'.format(node.metadata.get('mautrix-whatsapp/version')),
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:mautrix-whatsapp:restart',
|
|
|
|
},
|
|
|
|
},
|
2020-12-31 11:18:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if node.has_bundle('matrix-synapse'):
|
|
|
|
files['/opt/mautrix-whatsapp/registration.yaml']['triggers'].add('svc_systemd:matrix-synapse:restart')
|