Development
This commit is contained in:
parent
6f23a57220
commit
4f5f2a8071
5 changed files with 157 additions and 9 deletions
|
|
@ -819,6 +819,10 @@ def collect_tokens():
|
|||
tokens['RADIUS_SECRET'] = open(f'{CONFIGS_DIR}/.radius-secret').read().strip()
|
||||
except OSError:
|
||||
tokens['RADIUS_SECRET'] = '(Generation is pending - visit Actions to apply generation command)'
|
||||
_radius_opts = cfg.get('radius_options', {})
|
||||
tokens['RADIUS_MAC_FORMAT'] = _radius_opts.get('mac_format', 'aabbccddeeff')
|
||||
tokens['RADIUS_APPLY_TO'] = _radius_opts.get('apply_to', 'all')
|
||||
tokens['RADIUS_LOGGING'] = 'true' if _radius_opts.get('logging', False) else ''
|
||||
tokens['STAT_BANNED_IP_COUNT'] = str(sum(1 for b in cfg.get('banned_ips', []) if b.get('enabled', True)))
|
||||
tokens['STAT_BLOCKLIST_COUNT'] = str(len(cfg.get('dns_blocking', {}).get('blocklists', [])))
|
||||
tokens['BLOCKLIST_STATS_HTML'] = _blocklist_stats_html(cfg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue