Skip to content

Instantly share code, notes, and snippets.

@eyenx
Last active January 20, 2016 19:48
Show Gist options
  • Select an option

  • Save eyenx/9fe1c7afc374adad0020 to your computer and use it in GitHub Desktop.

Select an option

Save eyenx/9fe1c7afc374adad0020 to your computer and use it in GitHub Desktop.
Test if let's encrypt certificate is about to expire and redeploy tutum stack to get a new one
test $(($(date "+%s" --date="$(openssl s_client -connect eyenx.ch:443 2>/dev/null <<<QUIT | openssl x509 -noout -enddate | cut -d= -f2)") - $(date "+%s"))) -lt 86400 && tutum stack redeploy eyenx-ch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment