タグ

ブックマーク / blog.rhykw.net (1)

  • The 1st release of pdns-mrubybackend

    この記事は、mruby advent calendar 2015の18日目の記事です。 PowerDNSのバックエンドにmrubyを使うpdns-mrubybackendを昨日公開しました。 このモジュールを使うと、こんな風に遊べます。 まずは簡単なやつ。 def lookup Powerdns::answer.clear records = [ {"name"=>"example.com", "type"=>"SOA" ,"content"=>"ns.example.com. hostmaster.example.com. 1 1800 900 604800 3600",}, {"name"=>"rand.example.com","type"=>"TXT" ,"content"=>rand.to_s,}, ] records.each{|rec| if( rec["name"] ==

  • 1