diff --git a/library/configRead.c b/library/configRead.c index ff263fc..df54385 100644 --- a/library/configRead.c +++ b/library/configRead.c @@ -89,21 +89,22 @@ void configurationRead(ftpParameters_DataType *ftpParameters) void applyConfiguration(ftpParameters_DataType *ftpParameters) { - if (ftpParameters->singleInstanceModeOn == 1) - { - int returnCode = isProcessAlreadyRunning(); - if (returnCode == 1) - { - printf("\nThe process is already running.."); - exit(0); - } - } + /* Fork the process daemon mode */ + if (ftpParameters->daemonModeOn == 1) + { + daemonize("uFTP"); + } - /* Fork the process daemon mode */ - if (ftpParameters->daemonModeOn == 1) - { - daemonize("uFTP"); - } + if (ftpParameters->singleInstanceModeOn == 1) + { + int returnCode = isProcessAlreadyRunning(); + + if (returnCode == 1) + { + printf("\nThe process is already running.."); + exit(0); + } + } } void initFtpData(ftpDataType *ftpData) @@ -528,4 +529,4 @@ static int parseConfigurationFile(ftpParameters_DataType *ftpParameters, DYNV_Ve } return 1; -} \ No newline at end of file +}