Working.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user