mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6384 from Icinga/fix/sysconfigfile-warnings-buildfix
Remove leftover for sysconfig file parsing
This commit is contained in:
commit
050a709929
|
@ -143,7 +143,6 @@ static int Main()
|
||||||
|
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
Application::DeclarePrefixDir(ICINGA_PREFIX);
|
Application::DeclarePrefixDir(ICINGA_PREFIX);
|
||||||
Application::DeclareSysconfigFile(ICINGA_SYSCONFIGFILE);
|
|
||||||
Application::DeclareSysconfDir(ICINGA_SYSCONFDIR);
|
Application::DeclareSysconfDir(ICINGA_SYSCONFDIR);
|
||||||
Application::DeclareRunDir(ICINGA_RUNDIR);
|
Application::DeclareRunDir(ICINGA_RUNDIR);
|
||||||
Application::DeclareLocalStateDir(ICINGA_LOCALSTATEDIR);
|
Application::DeclareLocalStateDir(ICINGA_LOCALSTATEDIR);
|
||||||
|
@ -155,13 +154,6 @@ static int Main()
|
||||||
|
|
||||||
Application::DeclareZonesDir(Application::GetSysconfDir() + "/icinga2/zones.d");
|
Application::DeclareZonesDir(Application::GetSysconfDir() + "/icinga2/zones.d");
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
if (!autocomplete && !Utility::PathExists(Application::GetSysconfigFile())) {
|
|
||||||
Log(LogWarning, "icinga-app")
|
|
||||||
<< "Sysconfig file '" << Application::GetSysconfigFile() << "' cannot be read. Using default values.";
|
|
||||||
}
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
String icingaUser = Utility::GetFromEnvironment("ICINGA2_USER");
|
String icingaUser = Utility::GetFromEnvironment("ICINGA2_USER");
|
||||||
if (icingaUser.IsEmpty())
|
if (icingaUser.IsEmpty())
|
||||||
icingaUser = ICINGA_USER;
|
icingaUser = ICINGA_USER;
|
||||||
|
|
|
@ -1325,27 +1325,6 @@ void Application::DeclareStatePath(const String& path)
|
||||||
ScriptGlobal::Set("StatePath", path);
|
ScriptGlobal::Set("StatePath", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrives the path of the sysconfig file.
|
|
||||||
*
|
|
||||||
* @returns The path.
|
|
||||||
*/
|
|
||||||
String Application::GetSysconfigFile(void)
|
|
||||||
{
|
|
||||||
return ScriptGlobal::Get("SysconfigFile");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the path of the sysconfig file.
|
|
||||||
*
|
|
||||||
* @param path The new path.
|
|
||||||
*/
|
|
||||||
void Application::DeclareSysconfigFile(const String& path)
|
|
||||||
{
|
|
||||||
if (!ScriptGlobal::Exists("SysconfigFile"))
|
|
||||||
ScriptGlobal::Set("SysconfigFile", path);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the path for the modified attributes file.
|
* Retrieves the path for the modified attributes file.
|
||||||
*
|
*
|
||||||
|
|
|
@ -106,9 +106,6 @@ public:
|
||||||
static String GetIncludeConfDir();
|
static String GetIncludeConfDir();
|
||||||
static void DeclareIncludeConfDir(const String& path);
|
static void DeclareIncludeConfDir(const String& path);
|
||||||
|
|
||||||
static String GetSysconfigFile(void);
|
|
||||||
static void DeclareSysconfigFile(const String& path);
|
|
||||||
|
|
||||||
static String GetStatePath(void);
|
static String GetStatePath(void);
|
||||||
static void DeclareStatePath(const String& path);
|
static void DeclareStatePath(const String& path);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue