Hi,
I am using the runit cookbook. Below is how I assume a restart of runit
should look like but from the docs it apears that service is not supported
for runit. How do I accomplish the below?
template “/home/ubuntu/druid/batch.json” do
path "/home/ubuntu/druid/batch.json"
source "batch.json.erb"
owner "root"
group “root"
mode “0644"
variables({
:s3bucket => “#{s3bucket}”,:mysql_host => “#{mysql_host}”,
:mysql_username => “#{mysql_username}”, :mysql_password =>
”#{mysql_password}”
})
notifies :restart, resources(:service => “Batch”)
end
service “Batch” do
supports :restart => true, :start => true, :stop => true
action :enable
end
runit_service “Batch”
You appear to have an extra 'service' definition for Block.
You only need the runit_service.; probably better to use the modern
notifies syntax too:
notifies :restart, "service[Batch]"
Please post the full debug logs relevant to any error you've received.
Cheers,
AJ
On 8 March 2013 23:00, David Montgomery davidmontgomery@gmail.com wrote:
Hi,
I am using the runit cookbook. Below is how I assume a restart of runit
should look like but from the docs it apears that service is not supported
for runit. How do I accomplish the below?
template "/home/ubuntu/druid/batch.json" do
path "/home/ubuntu/druid/batch.json"
source "batch.json.erb"
owner "root"
group "root"
mode "0644"
variables({
:s3bucket => "#{s3bucket}",:mysql_host => "#{mysql_host}",
:mysql_username => "#{mysql_username}", :mysql_password =>
"#{mysql_password}"
})
notifies :restart, resources(:service => "Batch")
end
service "Batch" do
supports :restart => true, :start => true, :stop => true
action :enable
end
runit_service "Batch"