fix: improve boundary configuration validation in start script
- Added a check to ensure the boundary configuration file is not empty after writing inline config. - Enhanced error messages for better clarity on configuration issues.
This commit is contained in:
parent
352b7752fb
commit
5f83d8188a
@ -234,17 +234,20 @@ function start_agentapi() {
|
|||||||
printf "Writing inline boundary config to %s\n" "$BOUNDARY_CONFIG_FILE"
|
printf "Writing inline boundary config to %s\n" "$BOUNDARY_CONFIG_FILE"
|
||||||
mkdir -p "$BOUNDARY_CONFIG_DIR"
|
mkdir -p "$BOUNDARY_CONFIG_DIR"
|
||||||
echo -n "$ARG_BOUNDARY_CONFIG" | base64 -d > "$BOUNDARY_CONFIG_FILE"
|
echo -n "$ARG_BOUNDARY_CONFIG" | base64 -d > "$BOUNDARY_CONFIG_FILE"
|
||||||
|
if [ ! -s "$BOUNDARY_CONFIG_FILE" ]; then
|
||||||
|
printf "Error: boundary configuration file '%s' does not exist or is empty after writing inline config.\n" "$BOUNDARY_CONFIG_FILE" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
elif [ -n "$ARG_BOUNDARY_CONFIG_PATH" ]; then
|
elif [ -n "$ARG_BOUNDARY_CONFIG_PATH" ]; then
|
||||||
printf "Linking boundary config from %s to %s\n" "$ARG_BOUNDARY_CONFIG_PATH" "$BOUNDARY_CONFIG_FILE"
|
printf "Linking boundary config from %s to %s\n" "$ARG_BOUNDARY_CONFIG_PATH" "$BOUNDARY_CONFIG_FILE"
|
||||||
if [ "$ARG_BOUNDARY_CONFIG_PATH" != "$BOUNDARY_CONFIG_FILE" ]; then
|
if [ "$ARG_BOUNDARY_CONFIG_PATH" != "$BOUNDARY_CONFIG_FILE" ]; then
|
||||||
mkdir -p "$BOUNDARY_CONFIG_DIR"
|
mkdir -p "$BOUNDARY_CONFIG_DIR"
|
||||||
ln -sf "$ARG_BOUNDARY_CONFIG_PATH" "$BOUNDARY_CONFIG_FILE"
|
ln -sf "$ARG_BOUNDARY_CONFIG_PATH" "$BOUNDARY_CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
fi
|
if [ ! -s "$BOUNDARY_CONFIG_FILE" ]; then
|
||||||
|
printf "Error: boundary configuration file '%s' does not exist or is empty. Check that '%s' exists and is not empty.\n" "$BOUNDARY_CONFIG_FILE" "$ARG_BOUNDARY_CONFIG_PATH" >&2
|
||||||
if [ ! -s "$BOUNDARY_CONFIG_FILE" ]; then
|
exit 1
|
||||||
printf "Error: boundary configuration file '%s' does not exist or is empty. Check boundary_config/boundary_config_path.\n" "$BOUNDARY_CONFIG_FILE" >&2
|
fi
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_boundary
|
install_boundary
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user