Improve Nginx service management

This commit is contained in:
VirtuBox
2019-08-27 12:32:48 +02:00
parent 378c9a4820
commit c60d4e306a
5 changed files with 40 additions and 20 deletions

View File

@@ -40,12 +40,14 @@ def GetDomainlevel(domain):
for domain_suffix in Suffix_file:
if (str(domain_suffix).strip()) == ('.'.join(domain_name[1:])):
domain_type = 'domain'
root_domain = domain_name[0:]
break
elif (str(domain_suffix).strip()) == ('.'.join(domain_name[2:])):
domain_type = 'subdomain'
root_domain = domain_name[1:]
break
else:
domain_type = 'other'
Suffix_file.close()
return (domain_type)
return (domain_type, root_domain)