mirror of https://github.com/Icinga/icinga2.git
Fixed default paths for icinga2.state and icinga2.pid files.
This commit is contained in:
parent
6717107205
commit
00fb17880c
|
@ -30,9 +30,6 @@ REGISTER_TYPE(IcingaApplication, NULL);
|
||||||
# define ICINGA_VERSION GIT_MESSAGE
|
# define ICINGA_VERSION GIT_MESSAGE
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
const String IcingaApplication::DefaultPidPath = "icinga2.pid";
|
|
||||||
const String IcingaApplication::DefaultStatePath = "icinga2.state";
|
|
||||||
|
|
||||||
IcingaApplication::IcingaApplication(const Dictionary::Ptr& serializedUpdate)
|
IcingaApplication::IcingaApplication(const Dictionary::Ptr& serializedUpdate)
|
||||||
: Application(serializedUpdate)
|
: Application(serializedUpdate)
|
||||||
{
|
{
|
||||||
|
@ -126,7 +123,7 @@ String IcingaApplication::GetPidPath(void) const
|
||||||
Value pidPath = Get("pid_path");
|
Value pidPath = Get("pid_path");
|
||||||
|
|
||||||
if (pidPath.IsEmpty())
|
if (pidPath.IsEmpty())
|
||||||
pidPath = DefaultPidPath;
|
pidPath = Application::GetLocalStateDir() + "/run/icinga2.pid";
|
||||||
|
|
||||||
return pidPath;
|
return pidPath;
|
||||||
}
|
}
|
||||||
|
@ -136,7 +133,7 @@ String IcingaApplication::GetStatePath(void) const
|
||||||
Value statePath = Get("state_path");
|
Value statePath = Get("state_path");
|
||||||
|
|
||||||
if (statePath.IsEmpty())
|
if (statePath.IsEmpty())
|
||||||
statePath = DefaultStatePath;
|
statePath = Application::GetLocalStateDir() + "/lib/icinga2.state";
|
||||||
|
|
||||||
return statePath;
|
return statePath;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,9 +51,6 @@ public:
|
||||||
|
|
||||||
double GetStartTime(void) const;
|
double GetStartTime(void) const;
|
||||||
|
|
||||||
static const String DefaultPidPath;
|
|
||||||
static const String DefaultStatePath;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
shared_ptr<SSL_CTX> m_SSLContext;
|
shared_ptr<SSL_CTX> m_SSLContext;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue