mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-22 08:15:18 +00:00
Better fallback for FQDN detection
This commit is contained in:
parent
0a98b3f82e
commit
ecb1d9b3f3
@ -20,8 +20,7 @@ STORAGE_PATH = "/var/lib/certidude/"
|
||||
try:
|
||||
FQDN = socket.getaddrinfo(socket.gethostname(), 0, socket.AF_INET, 0, 0, socket.AI_CANONNAME)[0][3]
|
||||
except socket.gaierror:
|
||||
click.echo("Failed to resolve fully qualified hostname of this machine, make sure hostname -f works")
|
||||
sys.exit(254)
|
||||
FQDN = socket.gethostname()
|
||||
|
||||
try:
|
||||
HOSTNAME, DOMAIN = FQDN.split(".", 1)
|
||||
|
Loading…
Reference in New Issue
Block a user