Change hostname function to get fqdn

Use the fqdn function so we are sure to always have the fqdn and not only the subdomain