This commit is contained in:
Your Name
2025-05-03 19:56:12 +12:00
parent 2fbe5307da
commit ec779e51c2
5 changed files with 29 additions and 18 deletions

View File

@ -8,19 +8,12 @@
source "$(dirname "$0")/_common.sh"
# Required environment variables
# check_required_env_vars "HOST_PORT"
check_required_env_vars "CONFIG_PATH"
# check if jq is installed
if ! command -v jq &> /dev/null; then
die "jq could not be found, please install it"
fi
# check if sos_config.json exists
if [ ! -f "${CONFIG_PATH}/sos_config.json" ]; then
die "sos_config.json does not exist"
fi
# extract port from sos_config.json
# determine port.
command -v jq &> /dev/null || die "jq could not be found, please install it"
[ -f "${CONFIG_PATH}/sos_config.json" ] || die "sos_config.json does not exist"
PORT=$(jq -r '.port' "${CONFIG_PATH}/sos_config.json")
echo $PORT