examples/kafka-jvm/chef/cookbooks/runit/libraries/provider_runit_service.rb
# refactor this whole thing into a Chef11 LWRP
refactor this whole thing into a Chef11 LWRP
refactor this whole thing into a Chef11 LWRP
def enable_service
          Chef::Log.debug("Creating symlink in service_dir for #{new_resource.service_name}")
          service_link.run_action(:create)
          unless inside_docker?  
            Chef::Log.debug("waiting until named pipe #{service_dir_name}/supervise/ok exists.")
            until ::FileTest.pipe?("#{service_dir_name}/supervise/ok")
              sleep 1
              Chef::Log.debug('.')
            end
            if new_resource.log
              Chef::Log.debug("waiting until named pipe #{service_dir_name}/log/supervise/ok exists.")
              until ::FileTest.pipe?("#{service_dir_name}/log/supervise/ok")
                sleep 1
                Chef::Log.debug('.')
              end
            end
          else
              Chef::Log.debug("skipping */supervise/ok check inside docker")
          end
        end
def enable_service Chef :: Log . debug ( "Creating symlink in service_dir for #{new_resource.service_name}" ) service_link . run_action ( :create ) unless inside_docker? Chef :: Log . debug ( "waiting until named pipe #{service_dir_name}/supervise/ok exists." ) until :: FileTest . pipe? ( "#{service_dir_name}/supervise/ok" ) sleep 1 Chef :: Log . debug ( '.' ) end if new_resource . log Chef :: Log . debug ( "waiting until named pipe #{service_dir_name}/log/supervise/ok exists." ) until :: FileTest . pipe? ( "#{service_dir_name}/log/supervise/ok" ) sleep 1 Chef :: Log . debug ( '.' ) end end else Chef :: Log . debug ( "skipping */supervise/ok check inside docker" ) end end
refactor this whole thing into a Chef11 LWRP
refactor this whole thing into a Chef11 LWRP