try reload again instead of quit and restart

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2023-11-19 18:11:18 +01:00
parent c425ff14c0
commit c534fa150d
3 changed files with 11 additions and 7 deletions

View File

@@ -120,14 +120,16 @@ const internalNginx = {
if (fs.existsSync(NgxPidFilePath)) {
const ngxPID = fs.readFileSync(NgxPidFilePath, 'utf8').trim();
if (ngxPID.length > 0) {
logger.info('Quitting Nginx');
utils.exec('nginx -s quit');
logger.info('Reloading Nginx');
utils.exec('nginx -s reload');
} else {
logger.info('Starting Nginx');
utils.execfg('nginx -e stderr');
}
}
logger.info('Starting Nginx in three seconds');
setTimeout(() => {
} else {
logger.info('Starting Nginx');
utils.execfg('nginx -e stderr');
}, 3000);
}
});
},