Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace python link checker with bash #216

Merged
merged 10 commits into from
Jun 24, 2020
Prev Previous commit
Next Next commit
Add historical curl code 51
  • Loading branch information
zevisert committed Jun 13, 2020
commit 7c4ac377ad31a0717e09ca6ee56cebd2d24d48e8
4 changes: 2 additions & 2 deletions link_checker/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ test_link () {
[[ ! $QUIET ]] && echo >&2 "🤝 [---] Handshaking with ${hostport} failed."
return 1 # Failed SSL

elif [[ "$curl_status" -eq 60 ]]; then
elif [[ "$curl_status" -eq 60 || "$curl_status" -eq 51 ]]; then
[[ $MARKDOWN ]] && echo "* [ ] --- $text $link (FAILED SSL VERIFICATION)"
[[ ! $QUIET ]] && echo >&2 "🔓 [---] ${hostport}'s SSL certificate is invalid!"
return 1 # Failed SSL
Expand All @@ -121,7 +121,7 @@ test_link () {
return 1 # Interrupted

elif [[ ! "$curl_status" -eq 0 ]]; then
[[ $MARKDOWN ]] && echo "* [ ] --- (cURL exited with: $curl_status) $text $link"
[[ $MARKDOWN ]] && echo "* [ ] --- $text $link (cURL exited with: $curl_status)"
[[ ! $QUIET ]] && echo >&2 "🤷 [---] Checking $hostport failed with error code $curl_status"
return 1 # cURL's unhappy, I'm unhappy
fi
Expand Down