]> git.stg.codes - stg.git/blobdiff - projects/stargazer/main.cpp
Moved AUTH_BY parser from global scope.
[stg.git] / projects / stargazer / main.cpp
index 09f0970f9fdb57dcc3a9ba99e301ca0b2347a82c..7cc8eccc6e54c32f7ead49ad48bd01357b7d88bf 100644 (file)
@@ -106,7 +106,7 @@ else
     }
 }
 //-----------------------------------------------------------------------------
     }
 }
 //-----------------------------------------------------------------------------
-#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)
 int StartScriptExecuter(char * procName, int msgKey, int * msgID, SETTINGS_IMPL * settings)
 #else
 int StartScriptExecuter(char *, int msgKey, int * msgID, SETTINGS_IMPL * settings)
@@ -151,7 +151,7 @@ switch (executerPid)
 
     case 0:
         delete settings;
 
     case 0:
         delete settings;
-#ifdef LINUX
+#if defined(LINUX) || defined(DARWIN)
         Executer(*msgID, executerPid, procName);
 #else
         Executer(*msgID, executerPid);
         Executer(*msgID, executerPid, procName);
 #else
         Executer(*msgID, executerPid);
@@ -160,7 +160,7 @@ switch (executerPid)
 
     default:
         if (executersPid.empty()) {
 
     default:
         if (executersPid.empty()) {
-#ifdef LINUX
+#if defined(LINUX) || defined(DARWIN)
             Executer(*msgID, executerPid, NULL);
 #else
             Executer(*msgID, executerPid);
             Executer(*msgID, executerPid, NULL);
 #else
             Executer(*msgID, executerPid);
@@ -264,21 +264,13 @@ else
 if (settings->ReadSettings())
     {
     STG_LOGGER & WriteServLog = GetStgLogger();
 if (settings->ReadSettings())
     {
     STG_LOGGER & WriteServLog = GetStgLogger();
+
     if (settings->GetLogFileName() != "")
         WriteServLog.SetLogFileName(settings->GetLogFileName());
     if (settings->GetLogFileName() != "")
         WriteServLog.SetLogFileName(settings->GetLogFileName());
+
     WriteServLog("ReadSettings error. %s", settings->GetStrError().c_str());
     exit(1);
     }
     WriteServLog("ReadSettings error. %s", settings->GetStrError().c_str());
     exit(1);
     }
-    /*************************************************************************************************/
-    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
 #ifndef NO_DAEMON
 std::string startFile(settings->GetConfDir() + START_FILE);
 #endif