Skip to content

Commit f9eec24

Browse files
authored
Merge pull request CrowdStrike#57 from falcon-pioupiou/fix-invalid-token
Move the cs_falcon_cid after the region check
2 parents 8023f8f + 777e4f7 commit f9eec24

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

bash/install/falcon-linux-install.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -548,17 +548,6 @@ cs_falcon_oauth_token=$(
548548
echo "$token"
549549
)
550550

551-
cs_falcon_cid=$(
552-
if [ -n "$FALCON_CID" ]; then
553-
echo "$FALCON_CID"
554-
else
555-
cs_target_cid=$(curl -s -L "https://$(cs_cloud)/sensors/queries/installers/ccid/v1" \
556-
-H "authorization: Bearer $cs_falcon_oauth_token")
557-
558-
echo "$cs_target_cid" | tr -d '\n" ' | awk -F'[][]' '{print $2}'
559-
fi
560-
)
561-
562551
region_hint=$(grep -i ^x-cs-region: "$response_headers" | head -n 1 | tr '[:upper:]' '[:lower:]' | tr -d '\r' | sed 's/^x-cs-region: //g')
563552
rm "${response_headers}"
564553

@@ -573,4 +562,15 @@ else
573562
fi
574563
fi
575564

565+
cs_falcon_cid=$(
566+
if [ -n "$FALCON_CID" ]; then
567+
echo "$FALCON_CID"
568+
else
569+
cs_target_cid=$(curl -s -L "https://$(cs_cloud)/sensors/queries/installers/ccid/v1" \
570+
-H "authorization: Bearer $cs_falcon_oauth_token")
571+
572+
echo "$cs_target_cid" | tr -d '\n" ' | awk -F'[][]' '{print $2}'
573+
fi
574+
)
575+
576576
main "$@"

0 commit comments

Comments
 (0)