Moved setting of hostname and public ip variables to a position after we have users permission to install wget on their system.