From ce6d1b89619e017f9d554a6fec62555fd1545575 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 7 Apr 2022 11:24:24 +0200 Subject: [PATCH] Place startup.log and status in /var/lib/icinga2/api, not /var/lib/icinga2/api/zones-stage not to loose them. --- lib/remote/apilistener-filesync.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/remote/apilistener-filesync.cpp b/lib/remote/apilistener-filesync.cpp index fd399e208..9c37e5151 100644 --- a/lib/remote/apilistener-filesync.cpp +++ b/lib/remote/apilistener-filesync.cpp @@ -592,15 +592,16 @@ void ApiListener::TryActivateZonesStage(const std::vector& relativePaths process->Run(); const ProcessResult& pr = process->WaitForResult(); + String apiDir = GetApiDir(); String apiZonesDir = GetApiZonesDir(); String apiZonesStageDir = GetApiZonesStageDir(); - String logFile = apiZonesStageDir + "/startup.log"; + String logFile = apiDir + "/zones-stage-startup.log"; std::ofstream fpLog(logFile.CStr(), std::ofstream::out | std::ostream::binary | std::ostream::trunc); fpLog << pr.Output; fpLog.close(); - String statusFile = apiZonesStageDir + "/status"; + String statusFile = apiDir + "/zones-stage-status"; std::ofstream fpStatus(statusFile.CStr(), std::ofstream::out | std::ostream::binary | std::ostream::trunc); fpStatus << pr.ExitStatus; fpStatus.close();