Improve recipe to only run domainname command if it exists in path.