bundlewrap/bundles/openhab/metadata.py
Franziska Kunsmann 8a24af27ee
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
bundles/openhab: backup-client/pre-hooks must not be a list
2022-01-24 07:29:36 +01:00

60 lines
1.5 KiB
Python

defaults = {
'apt': {
'packages': {
'openjdk-11-jre': {},
'openhab': {
'needs': {
'pkg_apt:openjdk-11-jre',
},
},
'openhab-addons': {
'needs': {
'pkg_apt:openhab',
},
},
},
'repos': {
'openhab': {
'items': {
'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main',
},
},
},
},
'backups': {
'paths': {
'/usr/share/openhab/addons', # not included in openhab backup
'/var/lib/openhab',
},
},
'backup-client': {
'pre-hooks': {
'openhab': '/usr/share/openhab/runtime/bin/backup --full\n',
},
},
}
@metadata_reactor.provides(
'nginx/vhosts/openhab',
)
def nginx(metadata):
if not node.has_bundle('nginx'):
raise DoNotRunAgain
return {
'nginx': {
'vhosts': {
'openhab': {
'domain': metadata.get('openhab/domain'),
'locations': {
'/': {
'target': 'http://localhost:22090/',
},
},
'website_check_path': '/',
'website_check_string': 'openHAB',
},
},
},
}