bundlewrap/bundles/radvd/items.py
Franziska Kunsmann f52df58517
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles: code style improvements
2021-02-12 20:45:41 +01:00

36 lines
782 B
Python

if node.has_bundle('pppd'):
files['/etc/ppp/ip-up.d/radvd'] = {
'source': 'ip-up',
'mode': '0755',
}
files['/etc/ppp/ip-down.d/radvd'] = {
'source': 'ip-down',
'mode': '0755',
}
# Will be started and stopped by pppd.
SHOULD_BE_RUNNING = None
SHOULD_BE_ENABLED = False
else:
SHOULD_BE_RUNNING = True
SHOULD_BE_ENABLED = True
files['/etc/radvd.conf'] = {
'content_type': 'mako',
'context': {
'interfaces': node.metadata['radvd']['interfaces'],
},
'triggers': {
'svc_systemd:radvd:restart',
},
}
svc_systemd = {
'radvd': {
'running': SHOULD_BE_RUNNING,
'enabled': SHOULD_BE_ENABLED,
'needs': {
'file:/etc/radvd.conf',
},
},
}