Not all environments require https scheduler. So start it only if ca certificate exists.
Signed-off-by: Wu Zhende wuzhende666@163.com --- container/scheduler-https/start | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/container/scheduler-https/start b/container/scheduler-https/start index 38c4892..6d6dda0 100755 --- a/container/scheduler-https/start +++ b/container/scheduler-https/start @@ -6,6 +6,9 @@ require 'set' require_relative '../defconfig.rb'
+warning = 'CA certificate is missing.Ignore if the HTTPS scheduler is not required' +raise warning unless File.exist?('/etc/compass-ci/ca/server.crt') && File.exist?('/etc/compass-ci/ca/server.key') + names = Set.new %w[ SCHED_HOST SCHED_PORT