File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,22 @@ function omissions() {
29
29
const internalCertificate = {
30
30
31
31
allowedSslFiles : [ 'certificate' , 'certificate_key' , 'intermediate_certificate' ] ,
32
- intervalTimeout : 1000 * 60 * 60 , // 1 hour
32
+ intervalTimeout : 86400 * 1000 , // 1 day
33
33
interval : null ,
34
34
intervalProcessing : false ,
35
35
renewBeforeExpirationBy : [ 30 , 'days' ] ,
36
36
37
37
initTimer : ( ) => {
38
- logger . info ( 'Let\'s Encrypt Renewal Timer initialized' ) ;
38
+ let timerExecutedEvery = 1 ;
39
+ if ( typeof process . env . CERTIFICATE_RENEWAL_INTERVAL_IN_DAYS !== 'undefined' ) {
40
+ internalCertificate . intervalTimeout = process . env . CERTIFICATE_RENEWAL_INTERVAL_IN_DAYS * 86400 * 1000 ;
41
+ timerExecutedEvery = process . env . CERTIFICATE_RENEWAL_INTERVAL_IN_DAYS ;
42
+ }
43
+ logger . info ( 'Timer for certificates renewal will be executed every ' + timerExecutedEvery + ' day(s)' ) ;
39
44
internalCertificate . interval = setInterval ( internalCertificate . processExpiringHosts , internalCertificate . intervalTimeout ) ;
40
45
// And do this now as well
41
46
internalCertificate . processExpiringHosts ( ) ;
47
+ logger . info ( 'Let\'s Encrypt Renewal Timer initialized' ) ;
42
48
} ,
43
49
44
50
/**
You can’t perform that action at this time.
0 commit comments