else
nil
end
+ @@domain = Rails.configuration.compute_node_domain rescue `hostname --domain`.strip
def info
@info ||= Hash.new
super
end
+ def domain
+ super || @@domain
+ end
+
def status
if !self.last_ping_at
if Time.now - self.created_at > 5.minutes
hostfile = File.join @@confdir, hostname
File.open hostfile, 'w' do |f|
f.puts "address=/#{hostname}/#{ip_address}"
+ f.puts "address=/#{hostname}.#{@@domain}/#{ip_address}" if @@domain
f.puts "ptr-record=#{ptr_domain},#{hostname}"
end
File.open(File.join(@@confdir, 'restart.txt'), 'w') do |f|
config.force_ssl = false
- config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
+ # config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
+
+ # config.compute_node_domain = `hostname --domain`.strip
end
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
- config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
+ # config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
+
+ # config.compute_node_domain = `hostname --domain`.strip
end
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
- config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
+ # config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
+
+ # config.compute_node_domain = `hostname --domain`.strip
end