add get_fqdn function

This commit is contained in:
Alexey Barabanov
2025-11-20 13:02:52 +03:00
parent 56ab87467d
commit 9249af4b75

View File

@@ -32,6 +32,19 @@ MYHOST = platform.node()
if not os.path.exists("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
telegram_bot_token = os.getenv("TELEGRAM_TOKEN")
telegram_chat_id = str(os.getenv("TELEGRAM_CHAT_ID"))
log_config = {