mirror of
https://github.com/certd/certd.git
synced 2026-04-30 01:07:28 +08:00
chore:
This commit is contained in:
@@ -106,8 +106,6 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
|||||||
})
|
})
|
||||||
script!: string;
|
script!: string;
|
||||||
|
|
||||||
copyToThisHost!: boolean;
|
|
||||||
|
|
||||||
@TaskOutput({
|
@TaskOutput({
|
||||||
title: '证书保存路径',
|
title: '证书保存路径',
|
||||||
})
|
})
|
||||||
@@ -152,17 +150,21 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
|||||||
|
|
||||||
const handle = async (opts: CertReaderHandleContext) => {
|
const handle = async (opts: CertReaderHandleContext) => {
|
||||||
const { tmpCrtPath, tmpKeyPath, tmpDerPath, tmpPfxPath, tmpIcPath } = opts;
|
const { tmpCrtPath, tmpKeyPath, tmpDerPath, tmpPfxPath, tmpIcPath } = opts;
|
||||||
if (this.copyToThisHost) {
|
// if (this.copyToThisHost) {
|
||||||
this.logger.info('复制到目标路径');
|
// this.logger.info('复制到目标路径');
|
||||||
this.copyFile(tmpCrtPath, crtPath);
|
// this.copyFile(tmpCrtPath, crtPath);
|
||||||
this.copyFile(tmpKeyPath, keyPath);
|
// this.copyFile(tmpKeyPath, keyPath);
|
||||||
this.copyFile(tmpIcPath, this.icPath);
|
// this.copyFile(tmpIcPath, this.icPath);
|
||||||
this.copyFile(tmpPfxPath, this.pfxPath);
|
// this.copyFile(tmpPfxPath, this.pfxPath);
|
||||||
this.copyFile(tmpDerPath, this.derPath);
|
// this.copyFile(tmpDerPath, this.derPath);
|
||||||
this.logger.warn('复制到当前主机功能已迁移到 “复制到本机”插件,请尽快换成复制到本机插件');
|
// this.logger.warn('复制到当前主机功能已迁移到 “复制到本机”插件,请尽快换成复制到本机插件');
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (accessId == null) {
|
||||||
|
this.logger.error('复制到当前主机功能已迁移到 “复制到本机”插件,请换成复制到本机插件');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const connectConf: SshAccess = await this.accessService.getById(accessId);
|
const connectConf: SshAccess = await this.accessService.getById(accessId);
|
||||||
const sshClient = new SshClient(this.logger);
|
const sshClient = new SshClient(this.logger);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user