1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-04-25 12:15:02 +02:00
score bcf2dd8794
Start unbound with intended arguments
Unbound looked like it was meant to be started as if by `unbound -c /etc/unbound/unbound.conf`, but instead the string `-c /etc/unbound/unbound.conf` was set as argv[0] of the unbound command, meaning it is never parsed.
2023-02-16 01:31:16 +00:00

14 lines
348 B
Python
Executable File

#!/usr/bin/env python3
import os
import logging as log
import sys
from socrate import conf, system
log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING"))
system.set_env()
conf.jinja("/unbound.conf", os.environ, "/etc/unbound/unbound.conf")
os.execv("/usr/sbin/unbound", ["unbound", "-c", "/etc/unbound/unbound.conf"])