bundlewrap/bundles/vnstat/items.py

28 lines
599 B
Python
Raw Normal View History

files = {
'/etc/vnstat.conf': {
'content_type': 'mako',
'context': node.metadata['vnstat'],
'triggers': {
'svc_systemd:vnstat:restart',
},
},
'/usr/local/bin/generate-vnstati': {
'mode': '0755',
},
}
if node.metadata['vnstat'].get('generate-web-dashboard', False):
files['/var/www/vnstat/index.html'] = {
'content_type': 'mako',
'context': node.metadata['vnstat'],
}
svc_systemd = {
'vnstat': {
'needs': {
'pkg_apt:vnstat',
'file:/etc/vnstat.conf',
},
},
}