bundlewrap/bundles/vnstat/items.py
Franziska Kunsmann 7d78ac9db8
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/vnstat: add flag to generate statistics images, add to home.router
2020-11-16 17:07:05 +01:00

27 lines
599 B
Python

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',
},
},
}