bundles/vnstat: add flag to generate statistics images, add to home.router
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
2d856a1e9a
commit
7d78ac9db8
6 changed files with 73 additions and 9 deletions
|
@ -23,3 +23,23 @@ def get_default_interface(metadata):
|
|||
}
|
||||
|
||||
return {}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
def nginx_dashboard(metadata):
|
||||
if not node.has_bundle('nginx'):
|
||||
raise DoNotRunAgain
|
||||
|
||||
if not metadata.get('vnstat/generate-web-dashboard', False):
|
||||
return {}
|
||||
|
||||
return {
|
||||
'cron': {
|
||||
'vnstat_generate_web_dashboard': '*/10 * * * * root /usr/local/bin/generate-vnstati /var/www/vnstat',
|
||||
},
|
||||
'nginx': {
|
||||
'vhosts': {
|
||||
'vnstat': {},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue