From 3f0642109c68c35fc8564e78479e1a8200645df1 Mon Sep 17 00:00:00 2001 From: Nektarios Katakis Date: Wed, 12 Feb 2020 20:19:45 +0000 Subject: [PATCH] bind: create zones directory on setup action Closes: #1571 Signed-off-by: Nektarios Katakis Reviewed-by: James Valleroy --- actions/bind | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/actions/bind b/actions/bind index c41d8fd39..b4020a79d 100755 --- a/actions/bind +++ b/actions/bind @@ -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')