Skip to content

Commit

Permalink
Fixes #15174: Rudder directives posthook can not support multilines c…
Browse files Browse the repository at this point in the history
…ommand execution
  • Loading branch information
Fdall committed Jul 8, 2019
1 parent 2f967cc commit 995a62d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bundle agent package_management_RudderUniqueID {
&PACKAGE_MANAGER_ALLOW_UNTRUSTED:{manager_allow_untrusted |"manager_allow_untrusted[&i0&]" string => "&manager_allow_untrusted&";
}&

&PACKAGE_POST_HOOK_COMMAND:{command |"posthook[&i0&]" string => "&command&";
&PACKAGE_POST_HOOK_COMMAND:{command |"posthook[&i0&]" string => "&command&";
}&

"index_pkg" slist => getindices("package");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bundle agent manageFilesAndFolders_RudderUniqueID {
}&
&FILE_AND_FOLDER_MANAGEMENT_GROUP:{group |"file[&i&][group]" string => "&group&";
}&
&FILE_AND_FOLDER_MANAGEMENT_POST_HOOK_COMMAND:{cmd |"file[&i&][post_hook_command]" string => "&cmd&";
&FILE_AND_FOLDER_MANAGEMENT_POST_HOOK_COMMAND:{cmd |"file[&i&][post_hook_command]" string => "&cmd&";
}&
&FILE_AND_FOLDER_MANAGEMENT_SYMLINK_SOURCE:{src |"file[&i&][source]" string => "&src&";
}&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bundle agent check_generic_file_content_RudderUniqueID {

&GENERIC_FILE_CONTENT_ENFORCE:{enforce |"generic_file_content_enforced[&i&]" string => "&enforce&";
}&
&GENERIC_FILE_CONTENT_POST_HOOK_COMMAND:{command |"generic_file_content_posthook[&i&]" string => "&command&";
&GENERIC_FILE_CONTENT_POST_HOOK_COMMAND:{command |"generic_file_content_posthook[&i&]" string => "&command&";
}&
&GENERIC_FILE_CONTENT_DELETION_REGEXP:{delreg |"generic_file_content_deletion_regexp[&i&]" string => "&delreg&";
}&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bundle agent download_from_shared_folder_RudderUniqueID
&COPYFILE_DESTINATION:{destination |"copyfile[&i&][raw_destination]" string => "&destination&";
}&

&COPYFILE_POST_HOOK_COMMAND:{command |"copyfile[&i&][posthook]" string => "&command&";
&COPYFILE_POST_HOOK_COMMAND:{command |"copyfile[&i&][posthook]" string => "&command&";
}&

&TRACKINGKEY:{piuuid |"copyfile[&i&][uuid]" string => "&piuuid&";
Expand Down
3 changes: 2 additions & 1 deletion techniques/fileDistribution/fileTemplate/1.0/fileTemplate.st
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ bundle agent fileTemplate_RudderUniqueID {
&FILE_TEMPLATE_TEMPLATE_TYPE: {type|"types[&i&]" string => "&type&";}&

#Post hook command
&FILE_TEMPLATE_TEMPLATE_POST_HOOK_COMMAND: {command |"posthook[&i&]" string => "&command&";}&
&FILE_TEMPLATE_TEMPLATE_POST_HOOK_COMMAND: {command |"posthook[&i&]" string => "&command&";
}&

#Post hook persistence
&FILE_TEMPLATE_PERSISTENT_POST_HOOK: {persistence | "persist[&i&]" string => "&persistence&";}&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bundle agent manage_key_value_file_RudderUniqueID {
}&
&MANAGE_KEY_VALUE_OPTION:{option | "option[&i&]" string => "&option&";
}&
&MANAGE_KEY_VALUE_POST_HOOK_COMMAND:{post_hook | "post_hook[&i&]" string => "&post_hook&";
&MANAGE_KEY_VALUE_POST_HOOK_COMMAND:{post_hook | "post_hook[&i&]" string => "&post_hook&";
}&
&TRACKINGKEY:{uuid | "trackingkey[&i&]" string => "&uuid&";
}&
Expand Down
2 changes: 1 addition & 1 deletion techniques/systemSettings/process/services/1.1/services.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bundle agent services_RudderUniqueID
}&
&SERVICES_TECHNIQUE_BOOT:{boot |"boot[&i&]" string => "&boot&";
}&
&SERVICES_TECHNIQUE_POSTHOOK:{posthook |"posthook[&i&]" string => "&posthook&";
&SERVICES_TECHNIQUE_POSTHOOK:{posthook |"posthook[&i&]" string => "&posthook&";
}&
&SERVICES_TECHNIQUE_POSTHOOK_PERSISTENT:{persistent |"persistent[&i&]" string => "&persistent&";
}&
Expand Down

0 comments on commit 995a62d

Please sign in to comment.