def status
      return true unless config.managed?
      return false if pid.nil?

      begin
        Process.getpgid(pid)
      rescue Errno::ESRCH
        return false
      end

      begin
        TCPSocket.new(host, port).close

        Net::HTTP.start(host, port) do |http|
          http.request(Net::HTTP::Get.new('/'))
        end

        true
      rescue Errno::ECONNREFUSED, Errno::EINVAL
        false
      end
    end
def status
      return true unless config.managed?
      return false if pid.nil?

      begin
        Process.getpgid(pid)
      rescue Errno::ESRCH
        return false
      end

      begin
        TCPSocket.new(host, port).close

        Net::HTTP.start(host, port) do |http|
          http.request(Net::HTTP::Get.new('/'))
        end

        true
      rescue Errno::ECONNREFUSED, Errno::EINVAL
        false
      end
    end
Check the status of a managed fcrepo service