#!/bin/bash # runs in container # runs on host to start container usage() { echo -n "Usage: ${0}" echo -n " [-c ]" echo -n " [-a ]" echo -n " [-z (compress log)"] echo exit 1 } Config=/config/cvtt.cfg AdminPort=7220 COMPRESS_LOG=false while getopts "c:a:z" opt; do case ${opt} in c ) Config=$OPTARG ;; a ) AdminPort=$OPTARG ;; z ) COMPRESS_LOG=true ;; \? ) echo "Invalid option: -$OPTARG" >&2 usage ;; : ) echo "Option -$OPTARG requires an argument." >&2 usage ;; esac done Cmd="python3.12" Cmd="${Cmd} cvttpy/apps/microservices/mkt_data_gateway/md_gateway.py" Cmd="${Cmd} --config=${Config}" Cmd="${Cmd} --credentials_file=/.creds" Cmd="${Cmd} --admin_port=${AdminPort}" Cmd="${Cmd} --log_file=/logs/%T.md_gateway.log" if ${COMPRESS_LOG} ; then Cmd="${Cmd} --compress_log" fi echo ${Cmd} eval ${Cmd}