bundlewrap/bundles/gitea/items.py
Franziska Kunsmann 4271c92d70
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/gitea: fix chmod
2020-10-18 16:18:12 +02:00

57 lines
1.3 KiB
Python

downloads = {
'/usr/local/bin/gitea': {
'url': 'https://dl.gitea.io/gitea/{version}/gitea-{version}-linux-amd64'.format(version=node.metadata['gitea']['version']),
'sha256': node.metadata['gitea']['sha256'],
'triggers': {
'svc_systemd:gitea:restart',
},
},
}
directories = {
'/var/lib/gitea': {
'owner': 'git',
'mode': '0700',
'triggers': {
'svc_systemd:gitea:restart',
},
},
}
actions = {
'chmod_gitea': {
'command': 'chmod a+x /usr/local/bin/gitea',
'unless': 'test -x /usr/local/bin/gitea',
'needs': {
'download:/usr/local/bin/gitea',
},
},
}
files = {
'/etc/systemd/system/gitea.service': {
'content_type': 'mako',
'context': node.metadata['gitea'],
'triggers': {
'action:systemd-reload',
},
},
'/etc/gitea/app.ini': {
'content_type': 'mako',
'context': node.metadata['gitea'],
'triggers': {
'svc_systemd:gitea:restart',
},
},
}
svc_systemd = {
'gitea': {
'needs': {
'action:chmod_gitea',
'download:/usr/local/bin/gitea',
'file:/etc/systemd/system/gitea.service',
'file:/etc/gitea/app.ini',
},
},
}