}
}
//-----------------------------------------------------------------------------
-#ifdef LINUX
+#if defined(LINUX) || defined(DARWIN)
int StartScriptExecuter(char * procName, int msgKey, int * msgID, SETTINGS_IMPL * settings)
#else
int StartScriptExecuter(char *, int msgKey, int * msgID, SETTINGS_IMPL * settings)
case 0:
delete settings;
-#ifdef LINUX
+#if defined(LINUX) || defined(DARWIN)
Executer(*msgID, executerPid, procName);
#else
Executer(*msgID, executerPid);
default:
if (executersPid.empty()) {
-#ifdef LINUX
+#if defined(LINUX) || defined(DARWIN)
Executer(*msgID, executerPid, NULL);
#else
Executer(*msgID, executerPid);
if (settings->ReadSettings())
{
STG_LOGGER & WriteServLog = GetStgLogger();
+
if (settings->GetLogFileName() != "")
WriteServLog.SetLogFileName(settings->GetLogFileName());
WriteServLog("ReadSettings error. %s", settings->GetStrError().c_str());
exit(1);
}
-/*************************************************************************************************/
-//вывод scriptParams
- printfd(__FILE__, "--- Script params dump ---\n");
- std::vector<std::string>::const_iterator it(settings->GetScriptParams().begin());
- while (it != settings->GetScriptParams().end())
- {
- printfd(__FILE__, "%s\n", it->c_str());
- it++;
- }
- printfd(__FILE__, "--- End dump ---\n");
-/*************************************************************************************************/
-
+
#ifndef NO_DAEMON
std::string startFile(settings->GetConfDir() + START_FILE);
#endif
}
break;
default:
- WriteServLog("Ignore signel %d", sig);
+ WriteServLog("Ignore signal %d", sig);
break;
}
if (stop)