lib/daemonizable.rb
# If PID file is stale, remove it.
If PID file is stale, remove it.
If PID file is stale remove it .
def remove_stale_pid_file
        if File.exist?(@pid_file)
          if pid && Process.running?(pid)
            raise PidFileExist, "#{@pid_file} already exists, seems like it's already running (process ID: #{pid}). " +
                                "Stop the process or delete #{@pid_file}."
          else
            log ">> Deleting stale PID file #{@pid_file}"
            remove_pid_file
          end
        end
      end
def remove_stale_pid_file if File . exist? ( @pid_file ) if pid && Process . running? ( pid ) raise PidFileExist , "#{@pid_file} already exists, seems like it's already running (process ID: #{pid}). " + "Stop the process or delete #{@pid_file}." else log ">> Deleting stale PID file #{@pid_file}" remove_pid_file end end end
If PID file is stale, remove it.
If PID file is stale remove it .