This script is originally made by Marie Helene Kvello-Aune, I have just rewritten it for my own use-case, and added a email confirmation of certification renewal. Link to the original script is https://bitbucket.org/Savagedlight/savagedlightsmiscstuff/src/fecc7a7e9809d8fb6b0aaf3a9d187b7449a257b9/FreeBSD/scripts/letsencrypt_renew.sh?at=default
The original script is before the official release of Letsencrypt, and I have removed the --agree-dev-preview.
Enjoy if you can use it for your usecase.