Add config option to choose fqdn or hostname and use socket module
The new option spells out fully_qualified_domain_name since fqdn is such a mouthful of an abbreviation. In order to retrieve the fqdn or hostname in a portable manner the Python socket module seems the best bet. It also avoids the overhead of opening a command interpreter and pipe to get the information.
Showing
想要评论请 注册 或 登录