Guest User

Untitled

a guest
Apr 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. diff --git a/spectrum/src/main.cpp b/spectrum/src/main.cpp
  2. index a300a70..c02c1f6 100644
  3. --- a/spectrum/src/main.cpp
  4. +++ b/spectrum/src/main.cpp
  5. @@ -210,7 +210,7 @@ int main(int argc, char **argv)
  6. std::cerr << "Can't create service.working_dir directory " << CONFIG_STRING(&config, "service.working_dir") << ".\n";
  7. return 1;
  8. }
  9. -
  10. +#ifndef WIN32
  11. if (!CONFIG_STRING(&config, "service.group").empty() ||!CONFIG_STRING(&config, "service.user").empty() ) {
  12. struct group *gr;
  13. if ((gr = getgrnam(CONFIG_STRING(&config, "service.group").c_str())) == NULL) {
  14. @@ -225,7 +225,6 @@ int main(int argc, char **argv)
  15. chown(CONFIG_STRING(&config, "service.working_dir").c_str(), pw->pw_uid, gr->gr_gid);
  16. }
  17.  
  18. -#ifndef WIN32
  19. if (!no_daemon) {
  20. // daemonize
  21. daemonize(CONFIG_STRING(&config, "service.working_dir").c_str(), CONFIG_STRING(&config, "service.pidfile").c_str());
  22. @@ -260,7 +259,7 @@ int main(int argc, char **argv)
  23. std::string dir;
  24. BOOST_FOREACH(const log4cxx::LogString &prop, p.propertyNames()) {
  25. if (boost::ends_with(prop, ".File")) {
  26. - dir = p.get(prop);
  27. + log4cxx::helpers::Transcoder::encode(p.get(prop), dir);
  28. boost::replace_all(dir, "${jid}", jid);
  29. break;
  30. }
Add Comment
Please, Sign In to add comment