
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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/container/scheduler-https/start b/container/scheduler-https/start index 38c4892..9898c1a 100755 --- a/container/scheduler-https/start +++ b/container/scheduler-https/start @@ -6,6 +6,13 @@ require 'set' require_relative '../defconfig.rb' +ca_path = '/etc/compass-ci/ca' +crt_path = "#{ca_path}/server.crt" +key_path = "#{ca_path}/server.key" + +warn_msg = 'CA certificate is missing. Ignore if the HTTPS scheduler is not required' +raise warn_msg unless File.exist?(crt_path) && File.exist?(key_path) + names = Set.new %w[ SCHED_HOST SCHED_PORT -- 2.23.0