Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DIARIO_MANAGER
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
DIARIO_MANAGER
Commits
eb9931e2
Commit
eb9931e2
authored
Mar 02, 2018
by
Marcos Antonio Moura Campos Junior
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alteracao manager de novo
parent
7ff6b439
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
scripts/add_domain.py
scripts/add_domain.py
+4
-2
No files found.
scripts/add_domain.py
View file @
eb9931e2
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment