mirror of
https://github.com/certd/certd.git
synced 2026-04-15 13:32:37 +08:00
perf: 支持群晖
This commit is contained in:
@@ -45,7 +45,7 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
|
||||
email!: string;
|
||||
|
||||
@TaskInput({
|
||||
title: "PFX密码",
|
||||
title: "PFX证书密码",
|
||||
component: {
|
||||
name: "a-input-password",
|
||||
vModel: "value",
|
||||
@@ -191,14 +191,14 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
|
||||
*/
|
||||
async condition() {
|
||||
if (this.forceUpdate) {
|
||||
this.logger.info("强制更新证书选项已勾选,准备申请新证书");
|
||||
return null;
|
||||
}
|
||||
|
||||
let inputChanged = false;
|
||||
const oldInput = JSON.stringify(this.lastStatus?.input?.domains);
|
||||
const thisInput = JSON.stringify(this.domains);
|
||||
if (oldInput !== thisInput) {
|
||||
inputChanged = true;
|
||||
const inputChanged = this.ctx.inputChanged;
|
||||
if (inputChanged) {
|
||||
this.logger.info("输入参数变更,准备申请新证书");
|
||||
return null;
|
||||
}
|
||||
|
||||
let oldCert: CertReader | undefined = undefined;
|
||||
@@ -212,11 +212,6 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (inputChanged) {
|
||||
this.logger.info("输入参数变更,申请新证书");
|
||||
return null;
|
||||
}
|
||||
|
||||
const ret = this.isWillExpire(oldCert.expires, this.renewDays);
|
||||
if (!ret.isWillExpire) {
|
||||
this.logger.info(`证书还未过期:过期时间${dayjs(oldCert.expires).format("YYYY-MM-DD HH:mm:ss")},剩余${ret.leftDays}天`);
|
||||
|
||||
Reference in New Issue
Block a user