[icinga-checkins] icinga.org: icinga2/master: Windows: Fix missing path for repository handler

git at icinga.org git at icinga.org
Sat May 21 13:05:48 CEST 2016


Module: icinga2
Branch: master
Commit: e27dee5476abc694f25eb42389cb3b015b2ec379
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=e27dee5476abc694f25eb42389cb3b015b2ec379

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Sat May 21 13:04:51 2016 +0200

Windows: Fix missing path for repository handler

fixes #11817

---

 icinga-installer/icinga-installer.cpp |    2 +-
 lib/icinga/clusterevents.cpp          |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/icinga-installer/icinga-installer.cpp b/icinga-installer/icinga-installer.cpp
index c024315..3653b93 100644
--- a/icinga-installer/icinga-installer.cpp
+++ b/icinga-installer/icinga-installer.cpp
@@ -272,7 +272,7 @@ static int InstallIcinga(void)
 		MkDirP(dataDir + "/var/lib/icinga2/agent/inventory");
 		MkDirP(dataDir + "/var/lib/icinga2/api/config");
 		MkDirP(dataDir + "/var/lib/icinga2/api/log");
-		MkDirP(dataDir + "/var/lib/icinga2/api/zones");
+		MkDirP(dataDir + "/var/lib/icinga2/api/repository");
 		MkDirP(dataDir + "/var/lib/icinga2/api/zones");
 		MkDirP(dataDir + "/var/log/icinga2/compat/archive");
 		MkDirP(dataDir + "/var/log/icinga2/crash");
diff --git a/lib/icinga/clusterevents.cpp b/lib/icinga/clusterevents.cpp
index 34ff840..114e38c 100644
--- a/lib/icinga/clusterevents.cpp
+++ b/lib/icinga/clusterevents.cpp
@@ -721,6 +721,8 @@ Value ClusterEvents::UpdateRepositoryAPIHandler(const MessageOrigin::Ptr& origin
 	if (vrepository.IsEmpty() || !vrepository.IsObjectType<Dictionary>())
 		return Empty;
 
+	Utility::MkDirP(GetRepositoryDir(), 0755);
+
 	String repositoryFile = GetRepositoryDir() + SHA256(params->Get("endpoint")) + ".repo";
 
 	std::fstream fp;



More information about the icinga-checkins mailing list