bundlewrap/bundles/radvd/items.py
Franziska Kunsmann da4b139095
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/{radvd,wide-dhcp6c}: remove metadata key integrate-with-pppd
2020-12-18 16:30:17 +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',
},
},
}