fix(system-helpers): wrong usage of openssl
This commit is contained in:
parent
9d525bfc71
commit
73a3a2a91a
2 changed files with 1 additions and 6 deletions
|
@ -1,16 +1,11 @@
|
|||
import { appInfoSchema } from '@runtipi/shared';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { promisify } from 'util';
|
||||
import { exec } from 'child_process';
|
||||
import { getEnv } from '@/utils/environment/environment';
|
||||
import { pathExists } from '@/utils/fs-helpers';
|
||||
import { compose } from '@/utils/docker-helpers';
|
||||
import { copyDataDir, generateEnvFile } from './app.helpers';
|
||||
import { fileLogger } from '@/utils/logger/file-logger';
|
||||
|
||||
const execAsync = promisify(exec);
|
||||
|
||||
export class AppExecutors {
|
||||
private readonly rootFolderHost: string;
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ export const generateTlsCertificates = async (data: { domain?: string }) => {
|
|||
const subjectAltName = `DNS:*.${data.domain},DNS:${data.domain}`;
|
||||
|
||||
try {
|
||||
await execAsync(`openssl req -x509 -newkey rsa:4096 -keyout traefik/tls/key.pem -out traefik/tls/cert.pem -days 365 -subj "${subject}" -addext "${subjectAltName}" -nodes`);
|
||||
await execAsync(`openssl req -x509 -newkey rsa:4096 -keyout traefik/tls/key.pem -out traefik/tls/cert.pem -days 365 -subj "${subject}" -addext "subjectAltName = ${subjectAltName}" -nodes`);
|
||||
await fs.promises.writeFile(path.join(process.cwd(), 'traefik', 'tls', `${data.domain}.txt`), '');
|
||||
} catch (error) {
|
||||
fileLogger.error(error);
|
||||
|
|
Loading…
Add table
Reference in a new issue