ssl.rb 464 Bytes
Newer Older
1
2
module Symbiosis
  class SSL
3
    PROVIDERS ||= []
telyn's avatar
telyn committed
4
5
6
7
8
9
10
11
12
13
14
15

    def self.call_hooks(domains_with_updates)
      return if domains_with_updates.empty?

      Dir.glob('/etc/symbiosis/ssl-hooks.d/*').each do |script|
        next unless File.executable?(script)
        IO.popen([script, 'live-update'], 'r+') do |io|
          io.puts domains_with_updates.join("\n")
          io.close_write # Close the pipe now we've written stuff.
        end
      end
    end
16
17
  end
end