mirror of https://github.com/Icinga/icinga2.git
parent
7b4f1e217a
commit
dd4a7ab240
|
@ -193,8 +193,10 @@
|
||||||
/* %if (methods.execute == "PluginNotification" || methods.execute == "PluginCheck" || methods.execute == "PluginEvent") { */
|
/* %if (methods.execute == "PluginNotification" || methods.execute == "PluginCheck" || methods.execute == "PluginEvent") { */
|
||||||
// %require "command",
|
// %require "command",
|
||||||
%attribute %string "command",
|
%attribute %string "command",
|
||||||
|
%attribute %function "command",
|
||||||
%attribute %array "command" {
|
%attribute %array "command" {
|
||||||
%attribute %string "*"
|
%attribute %string "*"
|
||||||
|
%attribute %function "*",
|
||||||
},
|
},
|
||||||
%attribute %dictionary "arguments" {
|
%attribute %dictionary "arguments" {
|
||||||
%attribute %string "*",
|
%attribute %string "*",
|
||||||
|
|
|
@ -89,7 +89,7 @@ void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkab
|
||||||
Dictionary::Ptr raw_arguments = commandObj->GetArguments();
|
Dictionary::Ptr raw_arguments = commandObj->GetArguments();
|
||||||
|
|
||||||
Value command;
|
Value command;
|
||||||
if (!raw_arguments || raw_command.IsObjectType<Array>())
|
if (!raw_arguments || raw_command.IsObjectType<Array>() || raw_command.IsObjectType<Function>())
|
||||||
command = MacroProcessor::ResolveMacros(raw_command, macroResolvers, cr, NULL,
|
command = MacroProcessor::ResolveMacros(raw_command, macroResolvers, cr, NULL,
|
||||||
PluginUtility::EscapeMacroShellArg, resolvedMacros, useResolvedMacros);
|
PluginUtility::EscapeMacroShellArg, resolvedMacros, useResolvedMacros);
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue