<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>djbdns/templates/default/dnscache-servers.erb</filename>
    </added>
    <added>
      <filename>djbdns/templates/default/sv-public-dnscache-log-run.erb</filename>
    </added>
    <added>
      <filename>djbdns/templates/default/sv-public-dnscache-run.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -10,3 +10,4 @@ Contributors and Copyright holders:
  * Copyright 2008-2009, Adam Jacob &lt;adam@opscode.com&gt;
  * Copyright 2008-2009, Joshua Timberman &lt;joshua@opscode.com&gt;
  * Copyright 2009, Joe Williams &lt;joe@joetify.com&gt;
+ * Copyright 2009, Joshua Sierles &lt;joshua@37signals.com&gt;
\ No newline at end of file</diff>
      <filename>NOTICE</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@
 # Cookbook Name:: djbdns
 # Recipe:: default
 # Author:: Joshua Timberman (&lt;joshua@opscode.com&gt;)
+# Author:: Joshua Sierles (&lt;joshua@37signals.com&gt;)
 #
 # Copyright 2009, Opscode, Inc
 #
@@ -24,6 +25,9 @@ djbdns[:tinydns_internal_ipaddress] = &quot;127.0.0.1&quot; unless djbdns.has_key?(:tinydn
 djbdns[:axfrdns_ipaddress] = &quot;127.0.0.1&quot; unless djbdns.has_key?(:axfrdns_ipaddress)
 djbdns[:public_dnscache_ipaddress] = ipaddress unless djbdns.has_key?(:public_dnscache_ipaddress)
 
+djbdns[:public_dnscache_allowed_networks] = [ipaddress.split(&quot;.&quot;)[0,2].join(&quot;.&quot;)] unless djbdns.has_key?(:public_dnscache_allowed_networks)
+djbdns[:tinydns_internal_resolved_domain] = domain unless djbdns.has_key?(:tinydns_internal_resolved_domain)
+
 case lsb[:codename]
 when &quot;intrepid&quot;
   djbdns[:bin_dir] = &quot;/usr/bin&quot;</diff>
      <filename>djbdns/attributes/djbdns.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 #
 # Author:: Joshua Timberman (&lt;joshua@opscode.com&gt;)
+# Author:: Joshua Sierles (&lt;joshua@37signals.com&gt;)
 # Cookbook Name:: djbdns
 # Recipe:: cache
 #
@@ -20,30 +21,23 @@
 include_recipe &quot;djbdns&quot;
 
 execute &quot;public_cache_update&quot; do
-  cwd &quot;/etc/public-dnscache&quot;
+  cwd &quot;#{node[:runit_sv_dir]}/public-dnscache&quot;
   command &quot;#{node[:djbdns][:bin_dir]}/dnsip `#{node[:djbdns][:bin_dir]}/dnsqr ns . | awk '/answer:/ { print \$5 ; }' | sort` &gt; root/servers/@&quot;
   action :nothing
 end
 
-execute &quot;#{node[:djbdns][:bin_dir]}/dnscache-conf dnscache dnslog /etc/public-dnscache #{node[:djbdns][:public_dnscache_ipaddress]}&quot; do
-  only_if &quot;/usr/bin/test ! -d /etc/public-dnscache&quot;
+execute &quot;#{node[:djbdns][:bin_dir]}/dnscache-conf dnscache dnslog #{node[:runit_sv_dir]}/public-dnscache #{node[:djbdns][:public_dnscache_ipaddress]}&quot; do
+  only_if &quot;/usr/bin/test ! -d #{node[:runit_sv_dir]}/public-dnscache&quot;
   notifies :run, resources(&quot;execute[public_cache_update]&quot;)
 end
 
-template &quot;/etc/public-dnscache/run&quot; do
-  source &quot;sv-cache-run.erb&quot;
-  mode 0755
-end
-
-template &quot;/etc/public-dnscache/log/run&quot; do
-  source &quot;sv-cache-log-run.erb&quot;
-  mode 0755
-end
+runit_service &quot;public-dnscache&quot;
 
-link &quot;#{node[:runit_service_dir]}/public-dnscache&quot; do
-  to &quot;/etc/public-dnscache&quot;
+file &quot;#{node[:runit_sv_dir]}/public-dnscache/root/ip/#{node[:djbdns][:public_dnscache_allowed_networks]}&quot; do
+  mode 0644
 end
 
-link &quot;/etc/init.d/public-dnscache&quot; do
-  to node[:runit_sv_bin]
+template &quot;#{node[:runit_sv_dir]}/public-dnscache/root/servers/#{node[:djbdns][:tinydns_internal_resolved_domain]}&quot; do
+  source &quot;dnscache-servers.erb&quot;
+  mode 0644
 end</diff>
      <filename>djbdns/recipes/cache.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>djbdns/templates/default/sv-cache-log-run.erb</filename>
    </removed>
    <removed>
      <filename>djbdns/templates/default/sv-cache-run.erb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>d0d19233a74eca51b7e47559d0e106f748601399</id>
    </parent>
  </parents>
  <author>
    <name>jtimberman</name>
    <email>joshua@opscode.com</email>
  </author>
  <url>http://github.com/dbgrandi/cookbooks/commit/654e15f102f2a958af4a609a8ed0571af124304d</url>
  <id>654e15f102f2a958af4a609a8ed0571af124304d</id>
  <committed-date>2009-03-19T12:10:12-07:00</committed-date>
  <authored-date>2009-03-18T15:22:07-07:00</authored-date>
  <message>COOK-8, public-dnscache updates, runit service etc

Change public-dnscache to be a runit service.
Add Joshua Sierles to author list and NOTICE.
* Add attributes for resolved domain, allowed networks</message>
  <tree>5ded971538d23e31a23d5b0457bbe399db8994f9</tree>
  <committer>
    <name>jtimberman</name>
    <email>joshua@opscode.com</email>
  </committer>
</commit>
