Standarize unbound, prepare for setup inclusion
- Use jinja template for configuration file (start.py) - Limit access to the Mailu subnet - Implement health checks
This commit is contained in:
9
services/unbound/start.py
Executable file
9
services/unbound/start.py
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/local/bin/python3
|
||||
|
||||
import jinja2
|
||||
import os
|
||||
|
||||
convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
|
||||
convert("/unbound.conf", "/etc/unbound/unbound.conf")
|
||||
|
||||
os.execv("/usr/sbin/unbound", ["-c /etc/unbound/unbound.conf"])
|
||||
Reference in New Issue
Block a user