Commit c652b5ac authored by telyn's avatar telyn
Browse files

event type is now a parameter of Symbiosis::SSL.call_hooks

parent 79a977a5
......@@ -237,6 +237,6 @@ domains.sort_by(&:name).each do |domain|
Symbiosis::SSL.call_hooks domains_altered
Symbiosis::SSL.call_hooks domains_altered, 'live-update'
exit exit_code
......@@ -5,7 +5,7 @@ module Symbiosis
class SSL
def self.call_hooks(domains_with_updates)
def self.call_hooks(domains_with_updates, event)
return if domains_with_updates.empty?
hooks_path = Symbiosis.path_in_etc('/symbiosis/ssl-hooks.d/*')
......@@ -13,7 +13,7 @@ module Symbiosis
Dir.glob(hooks_path).each do |script|
next unless File.executable?(script)
next if File.basename(script) =~ /\..*$/
IO.popen([script, 'live-update'], 'r+') do |io|
IO.popen([script, event], 'r+') do |io|
io.puts domains_with_updates.join("\n")
io.close_write # Close the pipe now we've written stuff.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment