Table of Contents

Class DaemonUtils

Namespace
NLightning.Node.Utilities
Assembly
NLightning.Node.dll
public class DaemonUtils
Inheritance
DaemonUtils
Inherited Members

Methods

GetPidFilePath(string)

Gets the path for the PID file

public static string GetPidFilePath(string network)

Parameters

network string

Returns

string

IsRunningAsDaemon()

Checks if this process is already running as daemon

public static bool IsRunningAsDaemon()

Returns

bool

StartDaemonIfRequested(string[], IConfiguration, string, ILogger)

Starts the application as a daemon process if requested

public static bool StartDaemonIfRequested(string[] args, IConfiguration configuration, string pidFilePath, ILogger logger)

Parameters

args string[]

Command line arguments

configuration IConfiguration

Configuration

pidFilePath string

Path where to store the PID file

logger ILogger

Logger for startup messages

Returns

bool

True if the parent process should exit, false to continue execution

StopDaemon(string, ILogger)

Stops a running daemon if it exists

public static bool StopDaemon(string pidFilePath, ILogger logger)

Parameters

pidFilePath string
logger ILogger

Returns

bool