Method: Chef::Provider::Service::Upstart#enable_service

Defined in:
lib/chef/provider/service/upstart.rb

#enable_serviceObject



218
219
220
221
222
223
# File 'lib/chef/provider/service/upstart.rb', line 218

def enable_service
  logger.trace("#{@new_resource} upstart lacks inherent support for enabling services, editing job config file")
  conf = Chef::Util::FileEdit.new("#{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}")
  conf.search_file_replace(/^#start on/, "start on")
  conf.write_file
end