[chef] Custom init.d script not starting


Chronological Thread 
  • From: Arthur Kalmenson < >
  • To:
  • Subject: [chef] Custom init.d script not starting
  • Date: Fri, 13 Jan 2012 17:38:07 -0500

Hello everyone,

I'm building a cookbook that installs InspIRCd from source. It doesn't install an init.d script, so I made my own in templates. However, I'm finding that the call to the service resource doesn't start the IRC server, even though the chef-client output seems to indicate it does. I am, however, able to start it via "sudo /etc/init.d/inspircd start" or "sudo service inspircd start". Here's some code snippets:

inspircd.initd.erb

#!/bin/bash
#
# init.d script for inspircd

su - irc -c "<%= "#{node['inspircd']['install_dir']}" %>/inspircd $*"


default.rb

template "/etc/init.d/inspircd" do
  source "inspircd.initd.erb"
  owner "root"
  group "root"
  mode "0744"
end

service "inspircd" do
  supports :status => true, :restart => true
  action [ :enable, :start ]
end


chef-client output

....
[Fri, 13 Jan 2012 17:29:02 -0500] INFO: Processing template[/etc/init.d/inspircd] action create (inspircd::default line 72)
[Fri, 13 Jan 2012 17:29:02 -0500] INFO: Processing service[inspircd] action enable (inspircd::default line 79)
[Fri, 13 Jan 2012 17:29:02 -0500] INFO: Processing service[inspircd] action start (inspircd::default line 79)
[Fri, 13 Jan 2012 17:29:02 -0500] INFO: Chef Run complete in 0.6536 seconds
[Fri, 13 Jan 2012 17:29:02 -0500] INFO: Running report handlers
[Fri, 13 Jan 2012 17:29:02 -0500] INFO: Report handlers complete

Any help would be appreciated. Thank you.

All the best,
--
Arthur Kalmenson



Archive powered by MHonArc 2.6.16.

§