Skip to content

Commit

Permalink
COOK-814, add pill template files and template resources
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Nov 7, 2011
1 parent 1a69cd1 commit 9fedba3
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
5 changes: 4 additions & 1 deletion djbdns/recipes/axfr.rb
Expand Up @@ -44,7 +44,10 @@
end
runit_service "axfrdns"
when "bluepill"
bluepill_service "axfrdns" do
template "#{node['bluepill']['conf_dir']}/axfrdns.pill" do
source "axfrdns.pill.erb"
mode 0644
end bluepill_service "axfrdns" do
action [:enable,:load,:start]
end
when "daemontools"
Expand Down
4 changes: 4 additions & 0 deletions djbdns/recipes/internal_server.rb
Expand Up @@ -66,6 +66,10 @@
end
runit_service "tinydns-internal"
when "bluepill"
template "#{node['bluepill']['conf_dir']}/tinydns-internal.pill" do
source "tinydns-internal.pill.erb"
mode 0644
end
bluepill_service "tinydns-internal" do
action [:enable,:load,:start]
end
Expand Down
4 changes: 4 additions & 0 deletions djbdns/recipes/server.rb
Expand Up @@ -42,6 +42,10 @@
end
runit_service "tinydns"
when "bluepill"
template "#{node['bluepill']['conf_dir']}/tinydns.pill" do
source "tinydns.pill.erb"
mode 0644
end
bluepill_service "tinydns" do
action [:enable,:load,:start]
end
Expand Down
13 changes: 13 additions & 0 deletions djbdns/templates/default/axfrdns.pill.erb
@@ -0,0 +1,13 @@
Bluepill.application("axfrdns") do |app|

app.process("axfrdns") do |process|
process.pid_file = "/var/run/axfrdns.pid"
process.start_command = "<%= node[:djbdns][:axfrdns_dir] %>/run"
process.working_dir = "<%= node[:djbdns][:axfrdns_dir] %>"
process.uid = process.gid = "tinydns"
process.start_grace_time = 5.seconds
process.stop_grace_time = 5.seconds
process.restart_grace_time = 30.seconds
end

end
13 changes: 13 additions & 0 deletions djbdns/templates/default/tinydns.pill.erb
@@ -0,0 +1,13 @@
Bluepill.application("tinydns") do |app|

app.process("tinydns") do |process|
process.pid_file = "/var/run/tinydns.pid"
process.start_command = "<%= node[:djbdns][:tinydns_dir] %>/run"
process.working_dir = "<%= node[:djbdns][:tinydns_dir] %>"
process.uid = process.gid = "tinydns"
process.start_grace_time = 5.seconds
process.stop_grace_time = 5.seconds
process.restart_grace_time = 30.seconds
end

end

0 comments on commit 9fedba3

Please sign in to comment.