From 5d3a59354e9915a053d6693d79f8e6fd9023c3d8 Mon Sep 17 00:00:00 2001 From: Marvin Martinson Date: Mon, 28 Jun 2021 13:07:12 +0000 Subject: [PATCH] socket.getfqdn() not working correctly under alpine --- firewall.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firewall.py b/firewall.py index 7175210..81cbfb3 100755 --- a/firewall.py +++ b/firewall.py @@ -7,7 +7,8 @@ import ipaddress import pymongo from motor.motor_asyncio import AsyncIOMotorClient -FQDN = socket.getfqdn() +#For some reason socket.getfqdn() under alpine giving IP, getfqdn working fine under ubuntu +FQDN = socket.gethostname() DEBUG = os.getenv("DEBUG") DISABLE_MASQUERADE = os.getenv("DISABLE_MASQUERADE") MONGO_URI = os.getenv("MONGO_URI")