Have cURL properly fail on non-2xx status codes. (#12038)
Austin S. Hemmelgarn committed
Jan 25, 2022 at 13:23 UTC
cb56acd481a14ac3f097b16c026c0239e4f191a8
2 files changed
+2
-2
packaging/installer/kickstart.sh
+1
-1
@@ -356,7 +356,7 @@ download() {
356
url="${1}"
357
dest="${2}"
358
if command -v curl > /dev/null 2>&1; then
359
- run curl -q -sSL --connect-timeout 10 --retry 3 --output "${dest}" "${url}" || return 1
359
+ run curl --fail -q -sSL --connect-timeout 10 --retry 3 --output "${dest}" "${url}" || return 1
360
elif command -v wget > /dev/null 2>&1; then
361
run wget -T 15 -O "${dest}" "${url}" || return 1
362
else
packaging/installer/methods/kickstart.md
+1
-1
@@ -140,7 +140,7 @@ To use `md5sum` to verify the integrity of the `kickstart.sh` script you will do
140
run the following:
141
142
```bash
143
-[ "b02afd3bcb4b666487024946703c48d1" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
143
+[ "dc50e88ee6e19f50dd395e1e5117a1fa" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
144
```
145
146
If the script is valid, this command will return `OK, VALID`.