mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-04 00:13:33 +00:00
dep updates/enable ssl_dyn_rec_enable/fix nginx in background/remove tempwrite
Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
@@ -96,7 +96,7 @@ const generateKeys = () => {
|
||||
try {
|
||||
fs.writeFileSync(keysFile, JSON.stringify(keys, null, 2));
|
||||
} catch (err) {
|
||||
logger.error('Could not write JWT key pair to config file: ' + keysFile + ': ' . err.message);
|
||||
logger.error('Could not write JWT key pair to config file: ' + keysFile + ': ' + err.message);
|
||||
process.exit(1);
|
||||
}
|
||||
logger.info('Wrote JWT key pair to config file: ' + keysFile);
|
||||
@@ -150,7 +150,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Are we running in debug mdoe?
|
||||
* Are we running in debug mode?
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
|
@@ -1,5 +1,6 @@
|
||||
const _ = require('lodash');
|
||||
const exec = require('child_process').exec;
|
||||
const spawn = require('child_process').spawn;
|
||||
const execFile = require('child_process').execFile;
|
||||
const { Liquid } = require('liquidjs');
|
||||
const logger = require('../logger').global;
|
||||
@@ -22,6 +23,33 @@ module.exports = {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {String} cmd
|
||||
* @returns {Promise}
|
||||
*/
|
||||
execfg: function (cmd) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const childProcess = spawn(cmd, {
|
||||
shell: true,
|
||||
detached: true,
|
||||
stdio: 'inherit' // Use the same stdio as the current process
|
||||
});
|
||||
|
||||
childProcess.on('error', (err) => {
|
||||
reject(err);
|
||||
});
|
||||
|
||||
childProcess.on('close', (code) => {
|
||||
if (code !== 0) {
|
||||
reject(new Error(`Command '${cmd}' exited with code ${code}`));
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* @param {String} cmd
|
||||
* @param {Array} args
|
||||
|
Reference in New Issue
Block a user