]> granicus.if.org Git - icinga2/commitdiff
Fixed default paths for icinga2.state and icinga2.pid files.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 4 Feb 2013 08:48:37 +0000 (09:48 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 4 Feb 2013 08:48:37 +0000 (09:48 +0100)
lib/icinga/icingaapplication.cpp
lib/icinga/icingaapplication.h

index 91a58696adcda39262c644af94877cfdffd5a349..fea04901aefc13ffac34c915e644490874052128 100644 (file)
@@ -30,9 +30,6 @@ REGISTER_TYPE(IcingaApplication, NULL);
 #      define ICINGA_VERSION GIT_MESSAGE
 #endif /* _WIN32 */
 
-const String IcingaApplication::DefaultPidPath = "icinga2.pid";
-const String IcingaApplication::DefaultStatePath = "icinga2.state";
-
 IcingaApplication::IcingaApplication(const Dictionary::Ptr& serializedUpdate)
        : Application(serializedUpdate)
 {
@@ -126,7 +123,7 @@ String IcingaApplication::GetPidPath(void) const
        Value pidPath = Get("pid_path");
 
        if (pidPath.IsEmpty())
-               pidPath = DefaultPidPath;
+               pidPath = Application::GetLocalStateDir() + "/run/icinga2.pid";
 
        return pidPath;
 }
@@ -136,7 +133,7 @@ String IcingaApplication::GetStatePath(void) const
        Value statePath = Get("state_path");
 
        if (statePath.IsEmpty())
-               statePath = DefaultStatePath;
+               statePath = Application::GetLocalStateDir() + "/lib/icinga2.state";
 
        return statePath;
 }
index f17222afb5bcbfb3a1935c964a077f4d9ba459a5..3bf7a8a07f919c357d5d3bff6831ff32e3b4d0c6 100644 (file)
@@ -51,9 +51,6 @@ public:
 
        double GetStartTime(void) const;
 
-       static const String DefaultPidPath;
-       static const String DefaultStatePath;
-
 private:
        shared_ptr<SSL_CTX> m_SSLContext;