bundles/mautrix-whatsapp: use precompiled binary
This commit is contained in:
parent
4a4f45bc9d
commit
33b6700848
3 changed files with 12 additions and 27 deletions
|
@ -6,8 +6,8 @@ Requires=postgresql.service
|
|||
[Service]
|
||||
User=mautrix-whatsapp
|
||||
Group=mautrix-whatsapp
|
||||
ExecStart=/opt/mautrix-whatsapp/src/mautrix-whatsapp --config /opt/mautrix-whatsapp/config.yaml --registration /opt/mautrix-whatsapp/registration.yaml
|
||||
WorkingDirectory=/opt/mautrix-whatsapp/src
|
||||
ExecStart=/opt/mautrix-whatsapp/mautrix-whatsapp --config /opt/mautrix-whatsapp/config.yaml --registration /opt/mautrix-whatsapp/registration.yaml
|
||||
WorkingDirectory=/opt/mautrix-whatsapp
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
|
|
|
@ -6,40 +6,17 @@ users = {
|
|||
|
||||
directories = {
|
||||
'/opt/mautrix-whatsapp': {},
|
||||
'/opt/mautrix-whatsapp/src': {},
|
||||
'/opt/mautrix-whatsapp/logs': {
|
||||
'owner': 'mautrix-whatsapp',
|
||||
},
|
||||
}
|
||||
|
||||
git_deploy = {
|
||||
'/opt/mautrix-whatsapp/src': {
|
||||
'repo': 'https://github.com/mautrix/whatsapp.git',
|
||||
'rev': node.metadata.get('mautrix-whatsapp/version'),
|
||||
'triggers': {
|
||||
'action:mautrix-whatsapp_build',
|
||||
'svc_systemd:mautrix-whatsapp:restart',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
actions = {
|
||||
'mautrix-whatsapp_build': {
|
||||
'command': 'cd /opt/mautrix-whatsapp/src && GOMAXPROCS=$(nproc) go build',
|
||||
'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',
|
||||
'file:/opt/mautrix-whatsapp/mautrix-whatsapp',
|
||||
'postgres_db:mautrix-whatsapp',
|
||||
'postgres_role:mautrix-whatsapp',
|
||||
},
|
||||
|
@ -65,6 +42,15 @@ files = {
|
|||
'svc_systemd:mautrix-whatsapp:restart',
|
||||
},
|
||||
},
|
||||
'/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',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if node.has_bundle('matrix-synapse'):
|
||||
|
|
|
@ -2,7 +2,6 @@ defaults = {
|
|||
'apt': {
|
||||
'packages': {
|
||||
'libolm-dev': {},
|
||||
'golang-go': {},
|
||||
},
|
||||
},
|
||||
'cron': {
|
||||
|
|
Loading…
Reference in a new issue