mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
bind: create zones directory on setup action
Closes: #1571 Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
d0fcc179a7
commit
3f0642109c
@ -20,9 +20,10 @@ Configuration helper for BIND server.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
from plinth import action_utils
|
||||
from plinth.modules.bind import CONFIG_FILE, DEFAULT_CONFIG
|
||||
from plinth.modules.bind import CONFIG_FILE, DEFAULT_CONFIG, ZONES_DIR
|
||||
from plinth.modules.bind import set_forwarders, set_dnssec
|
||||
|
||||
|
||||
@ -47,6 +48,9 @@ def subcommand_setup(_):
|
||||
conf_file = open(CONFIG_FILE, "w")
|
||||
conf_file.write(DEFAULT_CONFIG)
|
||||
conf_file.close()
|
||||
|
||||
Path(ZONES_DIR).mkdir(exist_ok=True, parents=True)
|
||||
|
||||
action_utils.service_restart('bind9')
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user