@@ -8,6 +8,7 @@ const config = require('../lib/config');
8
8
const error = require ( '../lib/error' ) ;
9
9
const utils = require ( '../lib/utils' ) ;
10
10
const certificateModel = require ( '../models/certificate' ) ;
11
+ const tokenModel = require ( '../models/token' ) ;
11
12
const dnsPlugins = require ( '../global/certbot-dns-plugins' ) ;
12
13
const internalAuditLog = require ( './audit-log' ) ;
13
14
const internalNginx = require ( './nginx' ) ;
@@ -45,11 +46,11 @@ const internalCertificate = {
45
46
processExpiringHosts : ( ) => {
46
47
if ( ! internalCertificate . intervalProcessing ) {
47
48
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 ] + ' ...') ;
49
50
50
51
const expirationThreshold = moment ( ) . add ( internalCertificate . renewBeforeExpirationBy [ 0 ] , internalCertificate . renewBeforeExpirationBy [ 1 ] ) . format ( 'YYYY-MM-DD HH:mm:ss' ) ;
51
52
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
53
54
certificateModel
54
55
. query ( )
55
56
. where ( 'is_deleted' , 0 )
@@ -75,6 +76,7 @@ const internalCertificate = {
75
76
Promise . resolve ( {
76
77
permission_visibility : 'all' ,
77
78
} ) ,
79
+ token : new tokenModel ( ) ,
78
80
} ,
79
81
{ id : certificate . id } ,
80
82
)
@@ -88,6 +90,7 @@ const internalCertificate = {
88
90
return sequence ;
89
91
} )
90
92
. then ( ( ) => {
93
+ logger . info ( 'Completed SSL cert renew process' ) ;
91
94
internalCertificate . intervalProcessing = false ;
92
95
} )
93
96
. catch ( ( err ) => {
0 commit comments