Skip to content

Commit

Permalink
Add download content in install.sh call
Browse files Browse the repository at this point in the history
  • Loading branch information
diegodfrf committed Dec 19, 2023
1 parent fbe8240 commit 576c248
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ echo 'USER_CA_STORE="/path/to/my_cert.pem"' >> ./etc/preloaded-vars.conf
echo 'USER_GENERATE_AUTHD_CERT="y"' >> ./etc/preloaded-vars.conf
echo 'USER_AUTO_START="n"' >> ./etc/preloaded-vars.conf
echo 'USER_CREATE_SSL_CERT="n"' >> ./etc/preloaded-vars.conf
echo 'DOWNLOAD_CONTENT="%{_download_content_enabled}"' >> ./etc/preloaded-vars.conf
echo 'PROBANDO LA VARIABLE PRELOADED-VARS.CONF'
cat ./etc/preloaded-vars.conf
./install.sh

# Create directories
Expand Down Expand Up @@ -298,6 +301,15 @@ if [ $1 = 2 ]; then
fi
fi

echo "BUscando el archivo vd.tar.xz" > /etc/ossec-debug
echo "%{_localstatedir}" > /etc/ossec-debug
if [ -f "%{_localstatedir}/vd.tar.xz" ]; then
echo "Encontre el archivo" > /etc/ossec-debug
tar -xf %{_localstatedir}/vd.tar.xz -C %{_localstatedir}
chown wazuh:wazuh %{_localstatedir}/queue/vd
chown wazuh:wazuh %{_localstatedir}/queue/vd-updater
fi

# Fresh install code block
if [ $1 = 1 ]; then

Expand Down Expand Up @@ -715,6 +727,7 @@ rm -fr %{buildroot}
%attr(750, root, root) %config(missingok) %{_localstatedir}/packages_files/manager_installation_scripts/etc/templates/config/centos/*
%dir %attr(750, root, root) %config(missingok) %{_localstatedir}/packages_files/manager_installation_scripts/etc/templates/config/rhel
%attr(750, root, root) %config(missingok) %{_localstatedir}/packages_files/manager_installation_scripts/etc/templates/config/rhel/*
%attr(750, wazuh, wazuh) %{_localstatedir}/vd.tar.xz
%dir %attr(750, root, wazuh) %{_localstatedir}/queue
%attr(600, root, wazuh) %ghost %{_localstatedir}/queue/agents-timestamp
%dir %attr(750, wazuh, wazuh) %{_localstatedir}/queue/agentless
Expand Down

0 comments on commit 576c248

Please sign in to comment.