Skip to content
Permalink
Browse files

fix letsencrypt auto cron renewal variables

  • Loading branch information
centminmod committed Jan 16, 2016
1 parent 50345fa commit 160e6c612c9b4b5548b6b3bc7182863d0dc1f625
Showing with 5 additions and 5 deletions.
  1. +2 −2 addons/letsencrypt.sh
  2. +1 −1 inc/nginx_addvhost.inc
  3. +1 −1 inc/wpsetup.inc
  4. +1 −1 tools/nv.sh
@@ -593,7 +593,7 @@ deploycert() {
# EMAIL and LOGGING for cron
echo "EMAIL=\$(awk '/email/ {print \$3}' /etc/letsencrypt/webroot.ini)" > /usr/local/nginx/conf/ssl/${levhostname}/letsencrypt-${levhostname}-cron
echo "ERRORLOG=\$(tail /var/log/letsencrypt/letsencrypt.log)" >> /usr/local/nginx/conf/ssl/${levhostname}/letsencrypt-${levhostname}-cron
echo "CERT=\"/etc/letsencrypt/live/\${levhostname}/cert.pem\"" >> /usr/local/nginx/conf/ssl/${levhostname}/letsencrypt-${levhostname}-cron
echo "CERT=\"/etc/letsencrypt/live/${levhostname}/cert.pem\"" >> /usr/local/nginx/conf/ssl/${levhostname}/letsencrypt-${levhostname}-cron
echo "" >> /usr/local/nginx/conf/ssl/${levhostname}/letsencrypt-${levhostname}-cron

echo "if [[ -f "\$CERT" ]]; then" >> /usr/local/nginx/conf/ssl/${levhostname}/letsencrypt-${levhostname}-cron
@@ -613,7 +613,7 @@ deploycert() {
# cronjob error check and email send
cat >> "/usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron" <<CFF
if [ \$? -ne 0 ]; then
sleep 1; echo -e "The Lets Encrypt SSL Certificate for ${vhostname} has not been renewed! \n \n" \$ERRORLOG | mail -s "Lets Encrypt Cert Alert" \$EMAIL
sleep 1; echo -e "The Lets Encrypt SSL Certificate for ${vhostname} has not been renewed! \n \n" \$ERRORLOG | dos2unix | mail -s "Lets Encrypt Cert Alert" \$EMAIL
else
/usr/bin/ngxreload
fi
@@ -588,7 +588,7 @@ if [[ "$levhostssl" = [yY] ]]; then
# EMAIL and LOGGING for cron
echo "EMAIL=\$(awk '/email/ {print \$3}' /etc/letsencrypt/webroot.ini)" > /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "ERRORLOG=\$(tail /var/log/letsencrypt/letsencrypt.log)" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "CERT=\"/etc/letsencrypt/live/\${vhostname}/cert.pem\"" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "CERT=\"/etc/letsencrypt/live/${vhostname}/cert.pem\"" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron

echo "if [[ -f "\$CERT" ]]; then" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
@@ -1382,7 +1382,7 @@ if [[ "$levhostssl" = [yY] ]]; then
# EMAIL and LOGGING for cron
echo "EMAIL=\$(awk '/email/ {print \$3}' /etc/letsencrypt/webroot.ini)" > /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "ERRORLOG=\$(tail /var/log/letsencrypt/letsencrypt.log)" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "CERT=\"/etc/letsencrypt/live/\${vhostname}/cert.pem\"" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "CERT=\"/etc/letsencrypt/live/${vhostname}/cert.pem\"" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "if [[ -f "\$CERT" ]]; then" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
@@ -924,7 +924,7 @@ if [[ "$levhostssl" = [yY] ]]; then
# EMAIL and LOGGING for cron
echo "EMAIL=\$(awk '/email/ {print \$3}' /etc/letsencrypt/webroot.ini)" > /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "ERRORLOG=\$(tail /var/log/letsencrypt/letsencrypt.log)" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "CERT=\"/etc/letsencrypt/live/\${vhostname}/cert.pem\"" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "CERT=\"/etc/letsencrypt/live/${vhostname}/cert.pem\"" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron
echo "" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron

echo "if [[ -f "\$CERT" ]]; then" >> /usr/local/nginx/conf/ssl/${vhostname}/letsencrypt-${vhostname}-cron

0 comments on commit 160e6c6

Please sign in to comment.
You can’t perform that action at this time.