daemon: Fallback to gethostname when hostnamed can't be reached.