From 15354c284879c734ca9bd87450d715dcdbe8aec2 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 20 Sep 2012 13:02:18 +0200 Subject: capified and moved bin to own dir --- bin/leap_ca | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 bin/leap_ca (limited to 'bin') diff --git a/bin/leap_ca b/bin/leap_ca new file mode 100755 index 0000000..baefff2 --- /dev/null +++ b/bin/leap_ca @@ -0,0 +1,25 @@ +#!/usr/bin/ruby + +require 'rubygems' +require 'daemons' +require 'yajl/http_stream' + +require 'lib/cert' +require 'lib/couch_stream' +require 'lib/couch_changes' +require 'lib/pool' + + +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.fill +Daemons.run_proc('leap_ca.rb') do + changes.follow do |hash| + p hash + if hash[:deleted] + pool.fill + end + end +end -- cgit v1.2.3