Skip to content

Commit

Permalink
Fix force renewal
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Jan 17, 2024
1 parent 6ee9b30 commit 83e0e63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/executor/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,9 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec,
}
if (regenerateSsl || (!expectedSslMode && !sharedSSL && !selfSignSsl)) {
const remaining = subdomaindata['SSL cert expiry'] ? (Date.parse(subdomaindata['SSL cert expiry']) - Date.now()) / 86400000 : 0;
if (subdomaindata['Lets Encrypt renewal'] == 'Enabled' && (remaining > 30)) {
if (!regenerateSsl && subdomaindata['Lets Encrypt renewal'] == 'Enabled' && (remaining > 30)) {
await writeLog("$> SSL cert expiry is " + Math.trunc(remaining) + " days away so skipping renewal");
await writeLog("$> To enforce renewal please use 'ssl lets-encrypt'");
} else {
await writeLog("$> Generating SSL cert with Let's Encrypt");
await spawnSudoUtil('OPENSSL_CLEAN');
Expand Down

0 comments on commit 83e0e63

Please sign in to comment.