Application::DeclareZonesDir(Application::GetSysconfDir() + "/icinga2/zones.d");
+#ifndef _WIN32
+ if (!Utility::PathExists(Application::GetSysconfigFile())) {
+ Log(LogWarning, "icinga-app")
+ << "Sysconfig file '" << Application::GetSysconfigFile() << "' cannot be read. Using default values.";
+ }
+#endif /* _WIN32 */
+
String icingaUser = Utility::GetFromSysconfig("ICINGA2_USER");
if (icingaUser.IsEmpty())
icingaUser = ICINGA_USER;
std::cout << visibleDesc << std::endl
<< "Report bugs at <https://github.com/Icinga/icinga2>" << std::endl
+ << "Get support: <https://www.icinga.com/support/>" << std::endl
<< "Icinga home page: <https://www.icinga.com/>" << std::endl;
return EXIT_SUCCESS;
}
if (sysconf.IsEmpty())
return "";
+ if (!Utility::PathExists(sysconf))
+ return "";
+
String cmdInner = ". " + EscapeShellArg(sysconf) + " 2>&1 >/dev/null;echo \"$" + env + "\"";
String cmd = "sh -c " + EscapeShellArg(cmdInner);