mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Place startup.log and status in /var/lib/icinga2/api, not /var/lib/icinga2/api/zones-stage
not to loose them.
This commit is contained in:
parent
12293d999c
commit
3b03050340
@ -592,15 +592,16 @@ void ApiListener::TryActivateZonesStage(const std::vector<String>& 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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user