conditionally set hostname