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/src': {},
|
|
|
|
'/opt/mautrix-whatsapp/logs': {
|
|
|
|
'owner': 'mautrix-whatsapp',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
git_deploy = {
|
|
|
|
'/opt/mautrix-whatsapp/src': {
|
2021-08-06 14:25:21 +00:00
|
|
|
'repo': 'https://github.com/mautrix/whatsapp.git',
|
|
|
|
'rev': node.metadata.get('mautrix-whatsapp/version'),
|
2020-12-31 11:18:34 +00:00
|
|
|
'triggers': {
|
|
|
|
'action:mautrix-whatsapp_build',
|
|
|
|
'svc_systemd:mautrix-whatsapp:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
actions = {
|
|
|
|
'mautrix-whatsapp_build': {
|
2021-08-07 16:57:31 +00:00
|
|
|
'command': 'cd /opt/mautrix-whatsapp/src && GOMAXPROCS=$(nproc) go build',
|
2020-12-31 11:18:34 +00:00
|
|
|
'triggered': True,
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:golang-go',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
svc_systemd = {
|
|
|
|
'mautrix-whatsapp': {
|
|
|
|
'needs': {
|
|
|
|
'action:mautrix-whatsapp_build',
|
|
|
|
'directory:/opt/mautrix-whatsapp/logs',
|
|
|
|
'file:/etc/systemd/system/mautrix-whatsapp.service',
|
|
|
|
'file:/opt/mautrix-whatsapp/config.yaml',
|
|
|
|
'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',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
if node.has_bundle('matrix-synapse'):
|
|
|
|
files['/opt/mautrix-whatsapp/registration.yaml']['triggers'].add('svc_systemd:matrix-synapse:restart')
|