#!/usr/bin/env bash
#
# Copyright 2025 Confluent Inc.
#
set -o nounset
set -o errexit

export CP_COMPONENT_NAME=gateway
export CP_COMPONENT_SCRIPT_DIR=/opt/confluentinc/etc/${CP_COMPONENT_NAME}
export GATEWAY_CONFIG_DIR=/mnt/config

echo "===> User: $(id)"
export OPERATOR_SCRIPT_DIR=${GATEWAY_CONFIG_DIR}/${CP_COMPONENT_NAME}
echo "===> Loading ${CP_COMPONENT_NAME} operator scripts from path ${OPERATOR_SCRIPT_DIR}/bin"

exec "${OPERATOR_SCRIPT_DIR}"/bin/launch
