fix: edge control stdout pollution and install.sh dispatch
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful

- Redirect all status messages in caddy.sh to stderr (add_route, remove_route, reload_caddy)
- Redirect status message in authorized_keys.sh to stderr (rebuild_authorized_keys)
- Fix install.sh to source authorized_keys.sh library and call rebuild_authorized_keys directly
This commit is contained in:
Claude 2026-04-10 19:38:41 +00:00
parent cd115a51a3
commit 5a6cffeef8
3 changed files with 8 additions and 5 deletions

View file

@ -311,7 +311,10 @@ else
fi fi
# Create initial authorized_keys for tunnel user # Create initial authorized_keys for tunnel user
"${INSTALL_DIR}/lib/authorized_keys.sh" rebuild_authorized_keys # Source the library and call the function directly (not as subprocess)
source "${INSTALL_DIR}/lib/ports.sh"
source "${INSTALL_DIR}/lib/authorized_keys.sh"
rebuild_authorized_keys
# ============================================================================= # =============================================================================
# Step 6: Configure forced command for disinto-register # Step 6: Configure forced command for disinto-register

View file

@ -85,7 +85,7 @@ rebuild_authorized_keys() {
chmod 600 "$TUNNEL_AUTH_KEYS" chmod 600 "$TUNNEL_AUTH_KEYS"
chown -R "$TUNNEL_USER":"$TUNNEL_USER" "$TUNNEL_SSH_DIR" chown -R "$TUNNEL_USER":"$TUNNEL_USER" "$TUNNEL_SSH_DIR"
echo "Rebuilt authorized_keys for ${TUNNEL_USER} (entries: $(echo "$content" | grep -c 'ssh-' || echo 0))" echo "Rebuilt authorized_keys for ${TUNNEL_USER} (entries: $(echo "$content" | grep -c 'ssh-' || echo 0))" >&2
} }
# Get the current authorized_keys content (for verification) # Get the current authorized_keys content (for verification)

View file

@ -69,7 +69,7 @@ EOF
return 1 return 1
} }
echo "Added route: ${fqdn} → 127.0.0.1:${port}" echo "Added route: ${fqdn} → 127.0.0.1:${port}" >&2
} }
# Remove a route for a project # Remove a route for a project
@ -104,7 +104,7 @@ remove_route() {
return 1 return 1
} }
echo "Removed route: ${fqdn}" echo "Removed route: ${fqdn}" >&2
} }
# Reload Caddy to apply configuration changes # Reload Caddy to apply configuration changes
@ -118,7 +118,7 @@ reload_caddy() {
return 1 return 1
} }
echo "Caddy reloaded" echo "Caddy reloaded" >&2
} }
# Get Caddy config for debugging # Get Caddy config for debugging