bundlewrap/bundles/openhab/items.py
Franzi f482874310
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
home.openhab: install and configure openhab
2021-10-31 09:43:53 +01:00

29 lines
616 B
Python

extra_java_opts = []
for opt, value in sorted(node.metadata.get('openhab/java_opts', {}).items()):
if value is None:
extra_java_opts.append(f'-D{opt}')
else:
extra_java_opts.append(f'-D{opt}={value}')
files = {
'/etc/default/openhab': {
'content_type': 'mako',
'context': {
'extra_java_opts': ' '.join(extra_java_opts),
},
'triggers': {
'svc_systemd:openhab:restart',
},
},
}
svc_systemd = {
'openhab': {
'needs': {
'pkg_apt:openhab',
'pkg_apt:openhab-addons',
},
},
}