#!/usr/bin/env ruby #%# family=auto #%# capabilities=autoconf label = ENV["label"] pid_file = ENV["pid_file"] command = ARGV.shift case command when "autoconf", "detect" if pid_file.nil? puts "no (PID file isn't specified by env.pid_file)" exit(false) elsif File.exist?(pid_file) puts "yes" exit(true) else puts "no (PID file doesn't exist: #{pid_file})" exit(false) end when "config" if label title = "groonga: #{label}: CPU time" else title = "groonga: CPU time" end puts <" exit(false) end