mirror of
https://github.com/unraid/api.git
synced 2026-04-28 19:19:23 -05:00
fix: allow skipping daemonization
This commit is contained in:
@@ -25,6 +25,7 @@ interface Flags {
|
||||
command?: string;
|
||||
help?: boolean;
|
||||
debug?: boolean;
|
||||
'no-daemon'?: boolean;
|
||||
port?: string;
|
||||
'log-level'?: string;
|
||||
'log-transport'?: string;
|
||||
@@ -136,6 +137,11 @@ const commands = {
|
||||
const indexPath = './index.js';
|
||||
require(indexPath);
|
||||
|
||||
// Skip daemonizing
|
||||
if (mainOptions['no-daemon']) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mainOptions.debug) {
|
||||
if ('_DAEMONIZE_PROCESS' in process.env) {
|
||||
// In the child, clean up the tracking environment variable
|
||||
|
||||
Reference in New Issue
Block a user