[milter-manager-commit] milter-manager/milter-manager at 91c8a3c [master] binding ruby: Detect rspamadm command

Zurück zum Archiv-Index

Kenji Okimoto null+****@clear*****
Tue Jun 27 15:24:37 JST 2017


Kenji Okimoto	2017-06-27 15:24:37 +0900 (Tue, 27 Jun 2017)

  New Revision: 91c8a3c497ae05f35d3d4b94cb4d9c78c05d9a92
  https://github.com/milter-manager/milter-manager/commit/91c8a3c497ae05f35d3d4b94cb4d9c78c05d9a92

  Message:
    binding ruby: Detect rspamadm command

  Modified files:
    binding/ruby/lib/milter/manager/detector.rb

  Modified: binding/ruby/lib/milter/manager/detector.rb (+11 -1)
===================================================================
--- binding/ruby/lib/milter/manager/detector.rb    2017-06-27 15:20:06 +0900 (747a8a5)
+++ binding/ruby/lib/milter/manager/detector.rb    2017-06-27 15:24:37 +0900 (6ea27db)
@@ -90,7 +90,7 @@ module Milter::Manager
     end
 
     def detect_rspamd_proxy_connection_spec
-      Milter::Manager::RspamdProxyDetector.new(rspamadm_path).detect
+      Milter::Manager::RspamdProxyDetector.new(rspamadm_command).detect
     end
 
     def have_service_command?
@@ -121,6 +121,16 @@ module Milter::Manager
       ["/usr/bin/systemctl"]
     end
 
+    def rspamadm_command
+      @rspamadm_command ||= candidate_rspamadm_commands.find do |command|
+        File.executable?(command)
+      end
+    end
+
+    def candidate_rspamadm_commands
+      ["/usr/bin/rspamadm"]
+    end
+
     private
     def init_variables
       @name = nil
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the milter-manager-commit mailing list
Zurück zum Archiv-Index