Include any messages in the renewal failure email
This commit is contained in:
parent
821ae09b27
commit
9456dad28d
|
@ -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
|
||||||
|
@ -3702,7 +3705,7 @@ function set_your_domain_name {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set_hostname $DEFAULT_DOMAIN_NAME
|
set_hostname $DEFAULT_DOMAIN_NAME
|
||||||
|
|
||||||
echo 'set_your_domain_name' >> $COMPLETION_FILE
|
echo 'set_your_domain_name' >> $COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
@ -4128,7 +4131,7 @@ function configure_email {
|
||||||
fi
|
fi
|
||||||
EMAIL_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_email/hostname)
|
EMAIL_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_email/hostname)
|
||||||
if [[ $ONION_ONLY != "no" ]]; then
|
if [[ $ONION_ONLY != "no" ]]; then
|
||||||
set_hostname ${EMAIL_ONION_HOSTNAME}
|
set_hostname ${EMAIL_ONION_HOSTNAME}
|
||||||
MY_EMAIL_ADDRESS=${MY_USERNAME}@${DEFAULT_DOMAIN_NAME}
|
MY_EMAIL_ADDRESS=${MY_USERNAME}@${DEFAULT_DOMAIN_NAME}
|
||||||
fi
|
fi
|
||||||
if ! grep -q "Email onion domain" $COMPLETION_FILE; then
|
if ! grep -q "Email onion domain" $COMPLETION_FILE; then
|
||||||
|
@ -4217,13 +4220,13 @@ function configure_email {
|
||||||
sed -i 's|pam_mail.so nopen|pam_mail.so dir=~/Maildir nopen|g' /etc/pam.d/su
|
sed -i 's|pam_mail.so nopen|pam_mail.so dir=~/Maildir nopen|g' /etc/pam.d/su
|
||||||
|
|
||||||
echo 'dc_eximconfig_configtype="internet"' > /etc/exim4/update-exim4.conf.conf
|
echo 'dc_eximconfig_configtype="internet"' > /etc/exim4/update-exim4.conf.conf
|
||||||
if [[ $ONION_ONLY == "no" ]]; then
|
if [[ $ONION_ONLY == "no" ]]; then
|
||||||
# both ICANN and onion domains
|
# both ICANN and onion domains
|
||||||
echo "dc_other_hostnames='${DEFAULT_DOMAIN_NAME};${EMAIL_ONION_HOSTNAME}'" >> /etc/exim4/update-exim4.conf.conf
|
echo "dc_other_hostnames='${DEFAULT_DOMAIN_NAME};${EMAIL_ONION_HOSTNAME}'" >> /etc/exim4/update-exim4.conf.conf
|
||||||
else
|
else
|
||||||
# in onion-only mode the default domain is the same as the onion domain for email
|
# in onion-only mode the default domain is the same as the onion domain for email
|
||||||
echo "dc_other_hostnames='${DEFAULT_DOMAIN_NAME}'" >> /etc/exim4/update-exim4.conf.conf
|
echo "dc_other_hostnames='${DEFAULT_DOMAIN_NAME}'" >> /etc/exim4/update-exim4.conf.conf
|
||||||
fi
|
fi
|
||||||
echo "dc_local_interfaces=''" >> /etc/exim4/update-exim4.conf.conf
|
echo "dc_local_interfaces=''" >> /etc/exim4/update-exim4.conf.conf
|
||||||
echo "dc_readhost=''" >> /etc/exim4/update-exim4.conf.conf
|
echo "dc_readhost=''" >> /etc/exim4/update-exim4.conf.conf
|
||||||
echo "dc_relay_domains=''" >> /etc/exim4/update-exim4.conf.conf
|
echo "dc_relay_domains=''" >> /etc/exim4/update-exim4.conf.conf
|
||||||
|
|
Loading…
Reference in New Issue