lib/hosts_updater.rb
# Create required files, update auto file if necessary and generate hosts file.
# Need to be ran as root in order to access /etc/hosts
Create required files, update auto file if necessary and generate hosts file.
Need to be ran as root in order to access /etc/hosts
Create required files update auto file if necessary and generate hosts file . Need to be ran as root in order to access / etc / hosts
def run
    unless Process.uid == 0
      logger.error 'Error: Must run as root'
      exit
    end
    bootstrap
    update_auto_file if @options[:update]
    update_hosts_file
    logger.info 'Done.'
  end
def run unless Process . uid == 0 logger . error 'Error: Must run as root' exit end bootstrap update_auto_file if @options [ :update ] update_hosts_file logger . info 'Done.' end
Create required files, update auto file if necessary and generate hosts file.
Create required files update auto file if necessary and generate hosts file .