This commit is contained in:
squidbear
2025-04-01 12:35:54 +02:00
parent 673e4cd0a5
commit d2ec1b1d23
63 changed files with 63 additions and 63 deletions

View File

@@ -93,7 +93,7 @@ for part in "${parts[@]}"; do
[ -f "$input_file" ] || input_file="$BASEPATH/default.cfg"
# Run envsubst to replace environment variables in the input file and save the result to the output file
if yaml2json < "$BASEPATH/$part" | jq -e '.upstreams' >/dev/null 2>&1; then
if yaml2json < "$BASEPATH/$part" | jq -e '.["x-upstreams"]' >/dev/null 2>&1; then
#echo "upstreams key exists in $part"
upstreams+=("$(yaml2json < "$BASEPATH/$part" | jq '.upstreams' | json2yaml | sed 's/^/ /' | envsubst)")
else