LogAn/bin/loganinc
2010-03-29 19:16:27 +02:00

21 lines
306 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