fix dhparam generation
it cannot be created in default config creation time since it is already run pre-VM snapshot time
This commit is contained in:
@@ -490,7 +490,7 @@ async function writeAppNginxConfig(app, fqdn, bundle) {
|
||||
hasIPv6: sysinfo.hasIPv6(),
|
||||
ip: app.containerIp,
|
||||
port: app.manifest.httpPort,
|
||||
endpoint: endpoint,
|
||||
endpoint,
|
||||
certFilePath: bundle.certFilePath,
|
||||
keyFilePath: bundle.keyFilePath,
|
||||
robotsTxtQuoted,
|
||||
@@ -767,13 +767,6 @@ async function writeDefaultConfig(options) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!fs.existsSync(paths.DHPARAMS_FILE)) {
|
||||
debug('writeDefaultConfig: generating dhparams');
|
||||
const dhparams = safe.child_process.execSync('openssl dhparam -dsaparam 2048');
|
||||
if (!dhparams) throw new BoxError(BoxError.OPENSSL_ERROR, safe.error);
|
||||
if (!safe.fs.writeFileSync(paths.DHPARAMS_FILE, dhparams)) throw new BoxError(BoxError.FS_ERROR, `Could not save dhparams.pem: ${safe.error.message}`);
|
||||
}
|
||||
|
||||
const data = {
|
||||
sourceDir: path.resolve(__dirname, '..'),
|
||||
vhost: '',
|
||||
|
||||
Reference in New Issue
Block a user