Add get_fqdn function
This commit is contained in:
13
get_data.py
13
get_data.py
@@ -31,6 +31,19 @@ MYHOST = platform.node()
|
|||||||
|
|
||||||
if not os.path.exists("logs"):
|
if not os.path.exists("logs"):
|
||||||
os.makedirs("logs")
|
os.makedirs("logs")
|
||||||
|
def get_fqdn():
|
||||||
|
system_name = platform.system()
|
||||||
|
|
||||||
|
if system_name == "Linux":
|
||||||
|
hostname = platform.node()
|
||||||
|
fqdn = f"https://{hostname}.tvstart.ru"
|
||||||
|
else:
|
||||||
|
fqdn = "http://127.0.0.1"
|
||||||
|
|
||||||
|
return fqdn
|
||||||
|
|
||||||
|
FQDN = get_fqdn
|
||||||
|
|
||||||
|
|
||||||
def get_fqdn():
|
def get_fqdn():
|
||||||
system_name = platform.system()
|
system_name = platform.system()
|
||||||
|
|||||||
Reference in New Issue
Block a user