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:
Tim Möhlmann
2018-10-23 15:07:49 +03:00
parent 40d8e65762
commit bcfce27ee2
5 changed files with 31 additions and 18 deletions

9
services/unbound/start.py Executable file
View 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"])