bundles/vnstat: introduce, add to home.router

This commit is contained in:
Franzi 2020-11-16 16:33:26 +01:00
parent 9fa3757a96
commit 88dd587fb4
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 108 additions and 0 deletions

View file

@ -0,0 +1,25 @@
defaults = {
'apt': {
'packages': {
'vnstat': {},
'vnstati': {},
},
},
'vnstat': {
'bandwidth': '1000',
},
}
@metadata_reactor
def get_default_interface(metadata):
interfaces = sorted(metadata.get('interfaces', {}).keys())
if len(interfaces):
return {
'vnstat': {
'interface': interfaces[0],
},
}
return {}