This commit is contained in:
cn committed 2013-04-27 14:07:14 +02:00
commit 755a448174
18 files changed
+615

No files matched your search

@@ -0,0 +1,21 @@
module Dyndnsd
module Updater
class CommandWithBindZone
def initialize(config)
@zone_file = config['zone_file']
@command = config['command']
@generator = Generator::Bind.new(config)
end
def update(zone)
# write zone file in bind syntax
File.open(@zone_file, 'w') { |f| f.write(@generator.generate(zone)) }
# call user-defined command
pid = fork do
exec @command
end
end
end
end
end