From 1bac88549fc3bfda81e04b2811443a301aa9e781 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 20 Sep 2012 13:15:33 +0200 Subject: moved files into own dir and added main leap_ca.rb Also updated the couchdb.yml.example with more meaningful content --- bin/leap_ca | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/leap_ca b/bin/leap_ca index baefff2..f999238 100755 --- a/bin/leap_ca +++ b/bin/leap_ca @@ -1,19 +1,17 @@ #!/usr/bin/ruby +LEAP_CA_ROOT = File.expand_path('../..', __FILE__) +$:.unshift File.expand_path('lib', LEAP_CA_ROOT) require 'rubygems' require 'daemons' require 'yajl/http_stream' -require 'lib/cert' -require 'lib/couch_stream' -require 'lib/couch_changes' -require 'lib/pool' - +require 'leap_ca' puts "Tracking #{Cert.database.root}" couch = CouchStream.new(Cert.database.root) changes = CouchChanges.new(couch) -pool = LeapCA::Pool.new(File.expand_path("../config/pool.yml", __FILE__)) +pool = LeapCA::Pool.new(File.expand_path("config/pool.yml", LEAP_CA_ROOT)) pool.fill Daemons.run_proc('leap_ca.rb') do changes.follow do |hash| -- cgit v1.2.3