Check https environment var in telemetry tool

Issue-ID: POLICY-3706
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I4f473cd8a3852deefee6e449931eabde66bedeba
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
diff --git a/policy-management/src/main/server-gen/bin/telemetry b/policy-management/src/main/server-gen/bin/telemetry
index 454f11e..1ded332 100644
--- a/policy-management/src/main/server-gen/bin/telemetry
+++ b/policy-management/src/main/server-gen/bin/telemetry
@@ -39,6 +39,13 @@
 fi
 
 PROTOCOL="http"
+
+# use environment flag if set
+if [ $HTTP_SERVER_HTTPS == "true" ]; then
+    PROTOCOL="https"
+fi
+
+# it takes precedence to have https explicitly set over the environment variable
 if egrep "^http\.server\.services\..*CONFIG\.https.*=.*true" ${POLICY_HOME}/config/engine.properties; then
     PROTOCOL="https"
 fi