Skip to content

Commit

Permalink
Swap reporting plugin in wazuh-indexer package (specs)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 committed Sep 25, 2024
1 parent 33b30af commit 13a346d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions distribution/packages/src/deb/debmake_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ if [ -e "${buildroot}/${config_dir}/opensearch-observability/observability.yml"
chmod -c 660 "${buildroot}/${config_dir}/opensearch-observability/observability.yml"
fi

if [ -e "${buildroot}/${config_dir}/opensearch-reports-scheduler/reports-scheduler.yml" ]; then
chmod -c 660 "${buildroot}/${config_dir}/opensearch-reports-scheduler/reports-scheduler.yml"
if [ -e "${buildroot}/${config_dir}/wazuh-indexer-reports-scheduler/reports-scheduler.yml" ]; then
chmod -c 660 "${buildroot}/${config_dir}/wazuh-indexer-reports-scheduler/reports-scheduler.yml"
fi

# Files that need other permissions
Expand Down
8 changes: 4 additions & 4 deletions distribution/packages/src/rpm/wazuh-indexer.rpm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ For more information, see: https://www.wazuh.com/
%build

%define observability_plugin %( if [ -f %{_topdir}/etc/wazuh-indexer/opensearch-observability/observability.yml ]; then echo "1" ; else echo "0"; fi )
%define reportsscheduler_plugin %( if [ -f %{_topdir}/etc/wazuh-indexer/opensearch-reports-scheduler/reports-scheduler.yml ]; then echo "1" ; else echo "0"; fi )
%define reportsscheduler_plugin %( if [ -f %{_topdir}/etc/wazuh-indexer/wazuh-indexer-reports-scheduler/reports-scheduler.yml ]; then echo "1" ; else echo "0"; fi )

%install
set -e
Expand All @@ -77,7 +77,7 @@ fi

# Pre-populate the folders to ensure rpm build success even without all plugins
mkdir -p %{buildroot}%{config_dir}/opensearch-observability
mkdir -p %{buildroot}%{config_dir}/opensearch-reports-scheduler
mkdir -p %{buildroot}%{config_dir}/wazuh-indexer-reports-scheduler
mkdir -p %{buildroot}%{product_dir}/performance-analyzer-rca

# Pre-populate PA configs if not present
Expand Down Expand Up @@ -144,7 +144,7 @@ if [ %observability_plugin -eq 1 ]; then
fi

if [ %reportsscheduler_plugin -eq 1 ]; then
set -- "$@" "%{config_dir}/opensearch-reports-scheduler/reports-scheduler.yml"
set -- "$@" "%{config_dir}/wazuh-indexer-reports-scheduler/reports-scheduler.yml"
fi

for i in "$@"
Expand Down Expand Up @@ -251,7 +251,7 @@ exit 0
%endif

%if %reportsscheduler_plugin
%config(noreplace) %attr(660, %{name}, %{name}) %{config_dir}/opensearch-reports-scheduler/reports-scheduler.yml
%config(noreplace) %attr(660, %{name}, %{name}) %{config_dir}/wazuh-indexer-reports-scheduler/reports-scheduler.yml
%endif


Expand Down

0 comments on commit 13a346d

Please sign in to comment.