@@ -8,6 +8,7 @@ const config = require('../lib/config');
88const error = require ( '../lib/error' ) ;
99const utils = require ( '../lib/utils' ) ;
1010const certificateModel = require ( '../models/certificate' ) ;
11+ const tokenModel = require ( '../models/token' ) ;
1112const dnsPlugins = require ( '../global/certbot-dns-plugins' ) ;
1213const internalAuditLog = require ( './audit-log' ) ;
1314const internalNginx = require ( './nginx' ) ;
@@ -45,11 +46,11 @@ const internalCertificate = {
4546 processExpiringHosts : ( ) => {
4647 if ( ! internalCertificate . intervalProcessing ) {
4748 internalCertificate . intervalProcessing = true ;
48- logger . info ( 'Renewing SSL certs close to expiry ...' ) ;
49+ logger . info ( 'Renewing SSL certs expiring within ' + internalCertificate . renewBeforeExpirationBy [ 0 ] + ' ' + internalCertificate . renewBeforeExpirationBy [ 1 ] + ' ...') ;
4950
5051 const expirationThreshold = moment ( ) . add ( internalCertificate . renewBeforeExpirationBy [ 0 ] , internalCertificate . renewBeforeExpirationBy [ 1 ] ) . format ( 'YYYY-MM-DD HH:mm:ss' ) ;
5152
52- // Fetch all the letsencrypt certs from the db that will expire within N days
53+ // Fetch all the letsencrypt certs from the db that will expire within the configured threshold
5354 certificateModel
5455 . query ( )
5556 . where ( 'is_deleted' , 0 )
@@ -75,6 +76,7 @@ const internalCertificate = {
7576 Promise . resolve ( {
7677 permission_visibility : 'all' ,
7778 } ) ,
79+ token : new tokenModel ( ) ,
7880 } ,
7981 { id : certificate . id } ,
8082 )
@@ -88,6 +90,7 @@ const internalCertificate = {
8890 return sequence ;
8991 } )
9092 . then ( ( ) => {
93+ logger . info ( 'Completed SSL cert renew process' ) ;
9194 internalCertificate . intervalProcessing = false ;
9295 } )
9396 . catch ( ( err ) => {
0 commit comments