mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-11-02 19:18:07 +00:00
Change to mailustart functions
This commit is contained in:
committed by
Tim Möhlmann
parent
9684ebf33f
commit
004a431e97
@@ -1,17 +1,12 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import jinja2
|
||||
import os
|
||||
import logging as log
|
||||
import sys
|
||||
from mailustart import convert
|
||||
|
||||
log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING"))
|
||||
|
||||
def convert(src, dst):
|
||||
logger = log.getLogger("convert()")
|
||||
logger.debug("Source: %s, Destination: %s", 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