elasticdns 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/elasticdns.gemspec +1 -1
  2. data/lib/elasticdns.rb +13 -3
  3. metadata +1 -1
data/elasticdns.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'elasticdns'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.date = '2013-06-23'
5
5
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
6
6
  s.summary = "A simple bind9 configurator"
data/lib/elasticdns.rb CHANGED
@@ -62,18 +62,28 @@ module Elasticdns
62
62
  end
63
63
 
64
64
  def bind_checkconf
65
- `#{@config[:bind9_checkconf_path]} #{@config[:bind9_named_conf_file]}`
65
+ unless system("#{@config[:bind9_checkconf_path]} #{@config[:bind9_named_conf_file]}")
66
+ puts "Bind checkconf failed"
67
+ return false
68
+ else
69
+ return true
70
+ end
66
71
  end
67
72
 
68
73
  def bind_checkzone
69
74
  @config[:bind9_zone_files].each do |zone|
70
- `#{@config[:bind9_checkzone_path]} #{zone}`
75
+ unless system("#{@config[:bind9_checkzone_path]} #{zone}")
76
+ puts "Bind checkzone failed"
77
+ return false
78
+ else
79
+ return true
80
+ end
71
81
  end
72
82
  end
73
83
 
74
84
  def bind_init_cmd
75
85
  if bind_checkconf && bind_checkzone
76
- `#{@config[:bind9_init_cmd]}`
86
+ system("#{@config[:bind9_init_cmd]}")
77
87
  end
78
88
  end
79
89
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticdns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: