Hi,
you can define your commands freely.
Example for tomcat.
Define what do you want to do (i.e. in an attribute file):
# start the service
default[:tomcat][:start]= (platform == 'windows') ? 'C:\Applications \tomcat\bin\catalina.sh start' : \
"sudo service tomcat start"
# stop the service
default[:tomcat][:stop]= (platform == 'windows') ? 'C:\Applications \tomcat\bin\catalina.sh stop' : \
"sudo service tomcat stop"
#
# get service status. TODO: windows!?
default[:tomcat][:status]="sudo service tomcat status"
Overwrite the start,stop,... commands in your recipe:
...
service "tomcat" do
action :nothing
supports :start => true, :stop => true, :restart => true, :status => false
start_command node[:tomcat][:start]
stop_command node[:tomcat][:stop]
status_command node[:tomcat][:status]
restart_command "#{node[:tomcat][:stop]} && #{node[:tomcat] [:start]}"
end
...
Archive powered by MHonArc 2.6.16.