alteracao manager de novo

parent 7ff6b439
......@@ -54,7 +54,7 @@ env.hosts = [
env.user = 'root'
def altera_named(subdomain_name, file_db_name):
def altera_named(subdomain_name, domain_name, file_db_name):
"""
Função para atualizar o arquivo 'named.conf' com o novo subdomínio
Que será adicionado em /etc/named.conf
......@@ -81,6 +81,8 @@ def altera_named(subdomain_name, file_db_name):
text_to_replace,
ZONE.replace(
'__subdomain_name__', subdomain_name
).replace(
'__domain_name__', domain_name
).replace(
'__file_db_name__', file_db_name
)
......@@ -141,7 +143,7 @@ def exec_add_domain(subdomain_name, domain_name, droplet_ip):
raise Exception('Erro ao tentar copiar arquivo named.conf do servidor.')
# Alterando arquivo named.conf
local_named_path = altera_named(subdomain_name, file_db_name)
local_named_path = altera_named(subdomain_name, domain_name, file_db_name)
# Criando arquivo .db
file_db_path = cria_arquivo_db(subdomain_name, domain_name, file_db_name, droplet_ip)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment