@@ -79,16 +79,31 @@ macro(install_otc_config_fragment_directory)
7979 )
8080endmacro ()
8181
82- # e.g. /etc/otelcol-sumo/conf.d/examples
82+ # e.g. /etc/otelcol-sumo/conf.d-available
83+ macro (install_otc_config_fragments_available_directory )
84+ require_variables (
85+ "OTC_CONFIG_FRAGMENTS_AVAILABLE_DIR"
86+ )
87+ install (
88+ DIRECTORY
89+ DESTINATION "${OTC_CONFIG_FRAGMENTS_AVAILABLE_DIR} "
90+ DIRECTORY_PERMISSIONS
91+ OWNER_READ OWNER_WRITE OWNER_EXECUTE
92+ GROUP_READ GROUP_WRITE GROUP_EXECUTE
93+ COMPONENT otelcol-sumo
94+ )
95+ endmacro ()
96+
97+ # e.g. /etc/otelcol-sumo/conf.d-available/examples
8398macro (install_otc_config_examples )
8499 require_variables (
85- "OTC_CONFIG_FRAGMENTS_DIR "
100+ "OTC_CONFIG_FRAGMENTS_AVAILABLE_DIR "
86101 "ASSETS_DIR"
87102 )
88103
89104 install (
90105 DIRECTORY
91- DESTINATION "${OTC_CONFIG_FRAGMENTS_DIR } /examples"
106+ DESTINATION "${OTC_CONFIG_FRAGMENTS_AVAILABLE_DIR } /examples"
92107 DIRECTORY_PERMISSIONS
93108 OWNER_READ OWNER_WRITE OWNER_EXECUTE
94109 GROUP_READ GROUP_WRITE GROUP_EXECUTE
@@ -100,7 +115,7 @@ macro(install_otc_config_examples)
100115 foreach (example ${examples} )
101116 install (
102117 FILES "${example} "
103- DESTINATION "${OTC_CONFIG_FRAGMENTS_DIR } /examples"
118+ DESTINATION "${OTC_CONFIG_FRAGMENTS_AVAILABLE_DIR } /examples"
104119 PERMISSIONS
105120 OWNER_READ OWNER_WRITE OWNER_EXECUTE
106121 GROUP_READ GROUP_WRITE GROUP_EXECUTE
@@ -282,11 +297,11 @@ endmacro()
282297macro (install_otc_darwin_hostmetrics_yaml )
283298 require_variables (
284299 "ASSETS_DIR"
285- "OTC_CONFIG_FRAGMENTS_DIR "
300+ "OTC_CONFIG_FRAGMENTS_AVAILABLE_DIR "
286301 )
287302 install (
288303 FILES "${ASSETS_DIR} /conf.d/darwin.yaml"
289- DESTINATION "${OTC_CONFIG_FRAGMENTS_DIR } "
304+ DESTINATION "${OTC_CONFIG_FRAGMENTS_AVAILABLE_DIR } "
290305 RENAME "hostmetrics.yaml"
291306 PERMISSIONS
292307 OWNER_READ OWNER_WRITE
@@ -300,11 +315,11 @@ endmacro()
300315macro (install_otc_linux_hostmetrics_yaml )
301316 require_variables (
302317 "ASSETS_DIR"
303- "OTC_CONFIG_FRAGMENTS_DIR "
318+ "OTC_CONFIG_FRAGMENTS_AVAILABLE_DIR "
304319 )
305320 install (
306321 FILES "${ASSETS_DIR} /conf.d/linux.yaml"
307- DESTINATION "${OTC_CONFIG_FRAGMENTS_DIR } "
322+ DESTINATION "${OTC_CONFIG_FRAGMENTS_AVAILABLE_DIR } "
308323 RENAME "hostmetrics.yaml"
309324 PERMISSIONS
310325 OWNER_READ OWNER_WRITE
0 commit comments