mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-16 18:24:31 +02:00
parent
c719333b60
commit
33b2395ff0
@ -60,10 +60,17 @@ int AgentRemoveCommand::Run(const boost::program_options::variables_map& vm, con
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AgentUtility::RemoveAgent(ap[0])) {
|
bool failed = false;
|
||||||
Log(LogCritical, "cli", "Cannot remove agent '" + ap[0] + "'.");
|
|
||||||
return 1;
|
BOOST_FOREACH(const String& agent, ap) {
|
||||||
|
if (!AgentUtility::RemoveAgent(agent)) {
|
||||||
|
Log(LogCritical, "cli", "Cannot remove agent '" + ap[0] + "'.");
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
if (failed)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user