diff --git a/icinga-installer/icinga-installer.cpp b/icinga-installer/icinga-installer.cpp index c024315b5..3653b935a 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 34ff84042..114e38cae 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()) return Empty; + Utility::MkDirP(GetRepositoryDir(), 0755); + String repositoryFile = GetRepositoryDir() + SHA256(params->Get("endpoint")) + ".repo"; std::fstream fp;