Include any messages in the renewal failure email

This commit is contained in:
Bob Mottram 2016-01-02 10:35:00 +00:00
parent 821ae09b27
commit 9456dad28d
1 changed files with 13 additions and 10 deletions

View File

@ -1700,8 +1700,11 @@ function letsencrypt_renewals {
echo ' if [ -f /etc/nginx/sites-available/$LETSENCRYPT_DOMAIN ]; then' >> $renewals_script echo ' if [ -f /etc/nginx/sites-available/$LETSENCRYPT_DOMAIN ]; then' >> $renewals_script
echo ' ${PROJECT_NAME}-renew-cert -h $LETSENCRYPT_DOMAIN -p letsencrypt' >> $renewals_script echo ' ${PROJECT_NAME}-renew-cert -h $LETSENCRYPT_DOMAIN -p letsencrypt' >> $renewals_script
echo ' if [ ! "$?" = "0" ]; then' >> $renewals_script echo ' if [ ! "$?" = "0" ]; then' >> $renewals_script
echo -n " echo \"$renewal_failure_msg\" | mail -s \"$renewal_email_title\" " >> $renewals_script echo " echo \"${renewal_failure_msg}\n\n\" > ~/temp_renewletsencrypt.txt" >> $renewals_script
echo ' ${PROJECT_NAME}-renew-cert -h $LETSENCRYPT_DOMAIN -p letsencrypt >> ~/temp_renewletsencrypt.txt' >> $renewals_script
echo -n " cat ~/temp_renewletsencrypt.txt | mail -s \"${renewal_email_title}\" " >> $renewals_script
echo '$ADMIN_EMAIL_ADDRESS' >> $renewals_script echo '$ADMIN_EMAIL_ADDRESS' >> $renewals_script
echo ' rm ~/temp_renewletsencrypt.txt' >> $renewals_script
echo ' fi' >> $renewals_script echo ' fi' >> $renewals_script
echo ' fi' >> $renewals_script echo ' fi' >> $renewals_script
echo ' done' >> $renewals_script echo ' done' >> $renewals_script