Skip to content

Commit

Permalink
fixup! Fixes #22870: Use 8080 port to talk with the webapp in hooks
Browse files Browse the repository at this point in the history
Fixes #22870: Use 8080 port to talk with the webapp in hooks
  • Loading branch information
amousset committed Jun 9, 2023
1 parent 4636b70 commit 04de616
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ echo "[$(date --iso-8601=s)] received inventory for pending node '${RUDDER_NODE_
# https://docs.rudder.io/reference/current/usage/advanced_node_management.html#_creating_a_node_inventory_hook ).
# We will use `jq` to extract the relevant information from the API call response.

MODE=$(curl -k -X GET -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" -H "Content-Type: application/json" \
MODE=$(curl -X GET -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" -H "Content-Type: application/json" \
"http://localhost:8080/rudder/api/latest/nodes/${RUDDER_NODE_ID}?include=minimal,properties" | \
jq -r '.data.nodes[0].properties | map(select(.name = "accept"))[0].value')

Expand All @@ -53,7 +53,7 @@ MODE=$(curl -k -X GET -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" -H "Con
#
if [ "${MODE}" == "auto-accept" ]; then
# accept node
curl -f -k -X POST -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" \
curl -f -X POST -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" \
"http://localhost:8080/rudder/api/latest/nodes/pending/${RUDDER_NODE_ID}" -d 'status=accepted'

if [ "$?" -eq 0 ]; then
Expand Down

0 comments on commit 04de616

Please sign in to comment.