I am trying to install a binary and start the service. When I try to do that while I bootstrap the node, it just install the binary and never start the service. Any idea?
bash "install_package" do
cwd "/tmp/abcd"
user "root"
code <<-EOH
sudo ./somefile -i -key=#{node[:abcd][:key]} -f
EOH
#not_if{ ::File.exists?("file it creates") }
creates "/etc/init.d/someservce"
action :run
notifies :start, "service[someservce]", :immediately
do
My bin file accepts -i and key and get installed. But the service is not starting while boostrap...Even I tried a separate service resource to start the service it is not starting. Any idea?
I am trying to install a binary and start the service. When I try to do that while I bootstrap the node, it just install the binary and never start the service. Any idea?
bash "install_package" do
cwd "/tmp/abcd"
user "root"
code <<-EOH
sudo ./somefile -i -key=#{node[:abcd][:key]} -f
EOH
#not_if{ ::File.exists?("file it creates") }
creates "/etc/init.d/someservce"
action :run
notifies :start, "service[someservce]", :immediately
do
My bin file accepts -i and key and get installed. But the service is not starting while boostrap...Even I tried a separate service resource to start the service it is not starting. Any idea?
0 commentaires:
Enregistrer un commentaire