Sha256: d4b2b59928c7554e8e7766a0617ad6e14ae173dd4fc229eda3645cf8754ddc1e
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
#!/usr/bin/env ruby $:.push 'lib' require 'rubygems' require 'thor' require 'thor/group' require 'vagrant_dns_server' module VagrantDns class Generate < Thor::Group include Thor::Actions argument :upstream, :type => :string, :desc => 'upstream dns server', :default => '8.8.8.8' argument :zmq_url, :type => :string, :desc => 'zeromq connection url', :default => 'tcp://127.0.0.1:7005' def self.source_root # during dev time if(File.dirname(__FILE__) == './bin') File.dirname('.') else "#{File.dirname(__FILE__)}/../" end end desc "generate DNS server settings files #{ENV['HOME']}/.vagrant_dns.yaml" def create_yaml template('templates/vagrant_dns.yaml', "#{ENV['HOME']}/.vagrant_dns.yaml") end end end class Main < Thor desc 'server','Starts the dns server that will accept dns changes from vagrant machines' def server @server = VagrantDns::Server.new @server.process end register VagrantDns::Generate, 'generate', 'generate [upstream dns (8.8.8.8)] [zmq url (tcp://127.0.0.1)]', 'Generate vagrant_dns configuration file' end Main.start(ARGV)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vagrant-dns-server-0.4 | bin/vagrant_dns |
vagrant-dns-server-0.3 | bin/vagrant_dns |
vagrant-dns-server-0.2 | bin/vagrant_dns |