How to keep the control on chef-client while client run?


I have been working on something where I need to install an application on a Linux machine, It opens the Installation wizard and once it is completed chef run gets terminated and I need to run chef-client once again.

Is there any way I can keep the control in chef-client and it doesn’t terminate my client run.

We have no divination skills, without a recipe and log it’s just guessing… Please provide more details if you want us to help you.


I’m trying to start a service (Weblogic server) through chef. To do so, I have to run a script ( I did it using ‘execute’ and I see chef is executing that block but doesn’t seem like executing the shell script and staring the service.

My question is is there any way using chef I can start a service and put it in background??

Typically packages will have an option to do a silent install.

Check the documentation on the package. Most likely it will have a --silent or --quiet command line argument that you can pass in.

Some packages that require configuration at install time may instead use an ‘answers file’

If it doesn’t have any of those options, then you need to tell the package maintainer to implement an unattended option. You can’t automate a package if it requires human intervention.

Assuming you are using oracles web logic you can find the documentation for silent installs here:

However why reinvent the wheel, someone else has already written a web logic cookbook. Simply create a wrapper cookbook around their cookbook.

Thanks for the response @spuder I have no problem installing Weblogic. What my issue is with starting the weblogic server.

What I want to achieve is run a script which will start weblogic service (may be in background or foreground).

I am starting my weblogic servers through init scripts (which i had
configured …)… here is the code snippet i am using to start my servers.

// define this in your recipe .,.

template “startwls” do
path "#{node[‘weblogic’][‘init_script’]}"
source "startwls.erb"
mode "0755"
domain_name: hostname -s.chomp,
admin_credentials: Chef::EncryptedDataBagItem.load(“weblogic”,

Start the service weblogic

service “#{node[‘weblogic’][‘service’]}” do
action [ :start ]