LogAn/bin/loganinc
2010-03-29 19:59:34 +02:00

22 lines
305 B
Ruby
Executable file

#!/usr/bin/ruby
require 'logan'
require 'logan/inc'
opts = {}
opts[:server] = if ARGV[1]
ARGV
elsif ARGV[0]
['localhost', ARGV[1]]
else %w[localhost 1087]
end
opts[:server][1] = opts[:server][1].to_i
logan = LogAn::Inc::Main.new opts
begin
logan.main
rescue Object
logan.at_exit
raise $!
end