Development
This commit is contained in:
parent
d0cfffac52
commit
adcfe55c7c
24 changed files with 405 additions and 359 deletions
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
dns-blocklists.py -- Download and merge DNS blocklists defined in core.json.
|
||||
dns-blocklists.py -- Download and merge DNS blocklists defined in config.json.
|
||||
|
||||
Reads the blocklists library from core.json, downloads every blocklist referenced
|
||||
Reads the blocklists library from config.json, downloads every blocklist referenced
|
||||
by at least one VLAN, merges them into per-combo conf files (one per unique
|
||||
combination of blocklist names), then sends SIGHUP to each running dnsmasq
|
||||
instance so it reloads its config without restarting.
|
||||
|
|
@ -23,7 +23,7 @@ from pathlib import Path
|
|||
|
||||
PRODUCT_NAME = "routlin"
|
||||
SCRIPT_DIR = Path(__file__).parent
|
||||
CONFIG_FILE = SCRIPT_DIR / "core.json"
|
||||
CONFIG_FILE = SCRIPT_DIR / "config.json"
|
||||
BLOCKLIST_DIR = SCRIPT_DIR / "blocklists"
|
||||
LOG_FILE = SCRIPT_DIR / "dns-blocklists.log"
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ def load_config():
|
|||
with open(CONFIG_FILE) as f:
|
||||
data = json.load(f)
|
||||
if not data.get("vlans"):
|
||||
die("No vlans defined in core.json.")
|
||||
die("No vlans defined in config.json.")
|
||||
return data
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue