Your Name 3d9b1fa6d2 .
2025-05-03 23:18:52 +12:00

20 lines
526 B
Bash

#!/bin/bash
source "${AGENT_PATH}/_common.sh"
check_required_env_vars
# PORT SCRIPT
# The port script is OPTIONAL.
# It is used to return the ports used by the service.
# It is called with the path to the server specific env file as an argument.
# Required environment variables
# 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