Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (17 sloc) 533 Bytes
#!/usr/bin/env ruby
require "rubygems"
require "bundler/setup"
$: << File.join(File.dirname(__FILE__), 'lib')
require 'irclogger'
pidfile = File.join(File.dirname(__FILE__), 'tmp', 'logger.pid')
executable = File.join(File.dirname(__FILE__), 'launch-logger.sh')
unless Message.any_recent_messages?
puts "irclogger is stale, restarting"
begin
pid = File.read(pidfile).to_i
Process.kill(:TERM, pid)
rescue Errno::EPERM, Errno::ESRCH => e
puts "cannot kill: #{e.message}"
end
Process.spawn(executable)
end
Something went wrong with that request. Please try again.