From 79a7a0d4c60f4872afd0d2aa60f2cb51f11362e9 Mon Sep 17 00:00:00 2001 From: aki Date: Sun, 27 Apr 2025 00:05:43 +0800 Subject: [PATCH] fix(update-authelia): Use proper yq syntax since walk() does not exist like in jq --- update-setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update-setup.sh b/update-setup.sh index 002fdd2..50dc293 100755 --- a/update-setup.sh +++ b/update-setup.sh @@ -301,11 +301,11 @@ update_authelia_config() { # Update domain settings from .env echo -e "${BLUE}Applying Tailscale domain settings...${NC}" - # Replace placeholder full hostname - yq e -i "walk(if type == \"string\" and . == \"tailscale-nas.your-tailnet.ts.net\" then \"${FULL_HOSTNAME}\" else . end)" "$TEMP_CONFIG" + # Replace placeholder full hostname - using proper yq syntax instead of walk() + yq e -i "(.. | select(tag == \"!!str\" and . == \"tailscale-nas.your-tailnet.ts.net\")) = \"${FULL_HOSTNAME}\"" "$TEMP_CONFIG" - # Replace placeholder tailnet domain - yq e -i "walk(if type == \"string\" and . == \"your-tailnet.ts.net\" then \"${TAILNET_DOMAIN}\" else . end)" "$TEMP_CONFIG" + # Replace placeholder tailnet domain - using proper yq syntax instead of walk() + yq e -i "(.. | select(tag == \"!!str\" and . == \"your-tailnet.ts.net\")) = \"${TAILNET_DOMAIN}\"" "$TEMP_CONFIG" # Move temp file to final location mv "$TEMP_CONFIG" "$AUTHELIA_CONFIG"