+if [ ! -z ${HOST_IP} ]; then
+ export HOSTNAME=${HOST_IP}:9102
+else
+ export HOSTNAME=${SERVICE_IP}:9102
+fi
+
+if [ -z ${ENABLE_ENCRYPT} ]; then
+ export ENABLE_ENCRYPT=false
+fi
+echo ENABLE_ENCRYPT=$ENABLE_ENCRYPT
+
+KEY_PATH="$main_path/conf/holmes.keystore"
+KEY_PASSWORD="holmes"
+
+if [ -f "/opt/app/osaaf/local/org.onap.holmes-engine-mgmt.p12" ]; then
+ KEY_PATH="/opt/app/osaaf/local/org.onap.holmes-engine-mgmt.p12"
+ KEY_PASSWORD=`head -n1 "/opt/app/osaaf/local/mycreds.prop" | cut -d= -f2`
+fi
+
+echo "KEY_PATH=$KEY_PATH"
+echo "KEY_PASS=$KEY_PASSWORD"
+
+#HTTPS Configurations
+sed -i "s|key-store:.*|key-store: $KEY_PATH|" "$main_path/conf/application.yaml"
+sed -i "s|key-store-password:.*|key-store-password: $KEY_PASSWORD|" "$main_path/conf/application.yaml"
+
+if [ "${ENABLE_ENCRYPT}"x = "true"x ]; then
+ sed -i "s|#\?ssl:|ssl:|" "$main_path/conf/application.yaml"
+ sed -i "s|#\?key-store|key-store|" "$main_path/conf/application.yaml"
+ sed -i "s|#\?key-store-password|key-store-password|" "$main_path/conf/application.yaml"
+ sed -i "s|#\?key-store-type|key-store-type|" "$main_path/conf/application.yaml"
+else
+ sed -i 's|#\?ssl:|#ssl:|' "$main_path/conf/application.yaml"
+ sed -i "s|#\?key-store|#key-store|" "$main_path/conf/application.yaml"
+ sed -i "s|#\?key-store-password|#key-store-password|" "$main_path/conf/application.yaml"
+ sed -i "s|#\?key-store-type|#key-store-type|" "$main_path/conf/application.yaml"
+fi