Skip to content

Instantly share code, notes, and snippets.

@linktohack
Last active March 15, 2022 10:29
Show Gist options
  • Save linktohack/37a7f409e784430b8b3527b36c58b28d to your computer and use it in GitHub Desktop.
Save linktohack/37a7f409e784430b8b3527b36c58b28d to your computer and use it in GitHub Desktop.
Health check SSL (restart to take new SSL cert)
[[ "$(date '+%Y-%m-%d')" < "$(date '+%Y-%m-%d' -d "$(openssl s_client -connect localhost:465 2>/dev/null </dev/null | openssl x509 -noout -dates | awk -F= '/notAfter/ { print $2 " - 1 month" }')" )" ]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment