Skip to content

Commit

Permalink
armbianmonitor: call curl with --fail flag so server 400/500 erro…
Browse files Browse the repository at this point in the history
…rs actually trigger a retry

- otherwise, curl thinks a 4xx or 5xx error is perfectly acceptable. who knew?
  • Loading branch information
rpardini committed Nov 17, 2024
1 parent a70b864 commit d66285d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bsp/common/usr/bin/armbianmonitor
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ ParseOptions() {
# in clear since otherwise the log becomes worthless due to randomly generated
# addresses here and there that might conflict
sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' |
curl -s --data-binary @- "https://${paste_server}/log"
curl -s --fail --data-binary @- "https://${paste_server}/log"
# Check PIPESTATUS to know if everything worked. Any non-zero exit status means something didn't work.
for i in "${PIPESTATUS[@]}"; do
counter=$((counter + 1))
Expand Down

0 comments on commit d66285d

Please sign in to comment.