#!/usr/bin/env ruby
#
# Samizdat CGI/FastCGI dispatch
#
#   Copyright (c) 2002-2009  Dmitry Borodaenko <angdraug@debian.org>
#
#   This program is free software.
#   You can distribute/modify this program under the terms of
#   the GNU General Public License version 3 or later.
#
# vim: et sw=2 sts=2 ts=8 tw=0

require 'samizdat/engine'

$SAFE = 1 if $SAFE < 1

begin
  raise LoadError if defined?(MOD_RUBY)
  require 'fcgi'
  dispatcher = FCGIDispatcher.new
rescue LoadError
  dispatcher = CGIDispatcher.new
end

dispatcher.run
