X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5eadb33222ea8b0ab94bc8499a9caf2b02f5eb7b..2e04025761ba7c7fdd33f81f2b627c4b2ace1ef8:/projects/stargazer/main.cpp diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index 73786c4e..644fed91 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -338,8 +338,24 @@ while (running) switch (sig) { case SIGHUP: + { + SETTINGS_IMPL newSettings(settings); + if (newSettings.ReadSettings()) + { + STG_LOGGER & WriteServLog = GetStgLogger(); + + if (newSettings.GetLogFileName() != "") + WriteServLog.SetLogFileName(newSettings.GetLogFileName()); + + WriteServLog("ReadSettings error. %s", newSettings.GetStrError().c_str()); + } + else + { + settings = newSettings; + } traffCnt.Reload(); - manager.reload(); + manager.reload(settings); + } break; case SIGTERM: running = false; @@ -363,6 +379,8 @@ while (running) WriteServLog("+++++++++++++++++++++++++++++++++++++++++++++"); +manager.stop(); + if (loop.Stop()) WriteServLog("Event loop not stopped.");