From 9c7c71460642b78c208033d7ddef5722e2cae627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Tue, 1 Jun 2021 23:48:51 +0300 Subject: [PATCH] Cleaner FQDN resolution --- pinecrypt/server/const.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pinecrypt/server/const.py b/pinecrypt/server/const.py index 2f4e4d7..7326933 100644 --- a/pinecrypt/server/const.py +++ b/pinecrypt/server/const.py @@ -53,10 +53,7 @@ SELF_KEY_PATH = "/var/lib/certidude/server-secrets/self_key.pem" DHPARAM_PATH = "/var/lib/certidude/server-secrets/dhparam.pem" BUILDER_TARBALLS = "" -try: - FQDN = socket.getaddrinfo(socket.gethostname(), 0, socket.AF_INET, 0, 0, socket.AI_CANONNAME)[0][3] -except socket.gaierror: - FQDN = socket.gethostname() +FQDN = socket.getfqdn() try: HOSTNAME, DOMAIN = FQDN.split(".", 1)