From 25e14fcfe2783c5b8ee8138d38f47e5822042040 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 4 Jan 2024 14:41:20 +0700 Subject: [PATCH] Fix bugs --- src/executor/runner.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/executor/runner.js b/src/executor/runner.js index fa6de6e..a417628 100644 --- a/src/executor/runner.js +++ b/src/executor/runner.js @@ -629,7 +629,7 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, await writeLog("$> Disabling DNS feature"); if (subenabled) { await virtExec("disable-feature", value, { - subdomain, + domain: subdomain, dns: true, }); } else { @@ -639,7 +639,7 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, if (!subenabled) { await writeLog("$> Enabling DNS feature"); await virtExec("enable-feature", value, { - subdomain, + domain: subdomain, dns: true, }); } @@ -742,11 +742,11 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, changed = true; } if (regenerateSsl || (!expectedSslMode && !sharedSSL && !selfSignSsl)) { - const remaining = subdomaindata['SSL cert expiry'] ? (Date.now() - Date.parse(subdomaindata['SSL cert expiry'])) / 86400000 : 0; + const remaining = subdomaindata['SSL cert expiry'] ? (Date.parse(subdomaindata['SSL cert expiry']) - Date.now()) / 86400000 : 0; if (subdomaindata['Lets Encrypt renewal'] == 'Enabled' && (remaining > 30)) { await writeLog("$> SSL cert expiry is " + Math.trunc(remaining) + " days away so skipping renewal"); } else { - await writeLog("$> Generating ssl cert with let's encrypt"); + await writeLog("$> Generating SSL cert with Let's Encrypt"); await spawnSudoUtil('OPENSSL_CLEAN'); await virtExec("generate-letsencrypt-cert", { domain: subdomain,