Skip to content

Commit

Permalink
Fix RPM package references to /var/run (#119)
Browse files Browse the repository at this point in the history
* Switch /var/run references to /run

* Remove unneeded files from assembled packages (#115)

* add remove files function to assemble.sh

* Remove unneeded files on assembled tar packages

* Remove duplicated function

Fix wrong variable assignment

---------

Co-authored-by: Álex Ruiz <[email protected]>

* Add missing tools and files back into Wazuh Indexer packages (#117)

* add remove files function to assemble.sh

* Remove unneeded files on assembled tar packages

* Remove duplicated function

Fix wrong variable assignment

* Adding function to package Wazuh`s tools to assemble.sh

* Make the files' versions follow the repo's VERSION file

* Fix download of Wazuh tools for packages assembly

---------

Signed-off-by: Álex Ruiz <[email protected]>
Co-authored-by: Álex Ruiz <[email protected]>

* Remove unneeded symbolic links from assembled packages (#121)

* Remove reference to install_demo_configuration.sh

---------

Signed-off-by: Álex Ruiz <[email protected]>
Co-authored-by: Álex Ruiz <[email protected]>
  • Loading branch information
f-galland and AlexRuiz7 committed Nov 8, 2024
1 parent 4535419 commit d949146
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion distribution/packages/src/common/env/wazuh-indexer
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
OPENSEARCH_PATH_CONF=${path.conf}

# wazuh-indexer PID directory
#PID_DIR=/var/run/wazuh-indexer
#PID_DIR=/run/wazuh-indexer

# Additional Java OPTS
#OPENSEARCH_JAVA_OPTS=
Expand Down
4 changes: 2 additions & 2 deletions distribution/packages/src/common/scripts/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ if [ "$REMOVE_DIRS" = "true" ]; then
echo " OK"
fi

if [ -d /var/run/wazuh-indexer ]; then
if [ -d /run/wazuh-indexer ]; then
echo -n "Deleting PID directory..."
rm -rf /var/run/wazuh-indexer
rm -rf /run/wazuh-indexer
echo " OK"
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d /var/run/wazuh-indexer 0750 wazuh-indexer wazuh-indexer - -
d /run/wazuh-indexer 0750 wazuh-indexer wazuh-indexer - -
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RuntimeDirectory=wazuh-indexer
PrivateTmp=true
Environment=OPENSEARCH_HOME=/usr/share/wazuh-indexer
Environment=OPENSEARCH_PATH_CONF=${path.conf}
Environment=PID_DIR=/var/run/wazuh-indexer
Environment=PID_DIR=/run/wazuh-indexer
Environment=OPENSEARCH_SD_NOTIFY=true
EnvironmentFile=-${path.env}

Expand Down
2 changes: 1 addition & 1 deletion distribution/packages/src/deb/debmake_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ product_dir=/usr/share/wazuh-indexer
# config_dir=/etc/wazuh-indexer
data_dir=/var/lib/wazuh-indexer
log_dir=/var/log/wazuh-indexer
pid_dir=/var/run/wazuh-indexer
pid_dir=/run/wazuh-indexer
buildroot=${curdir}/debian/wazuh-indexer

# Create necessary directories
Expand Down
2 changes: 1 addition & 1 deletion distribution/packages/src/rpm/init.d/wazuh-indexer
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ MAX_OPEN_FILES=65535
MAX_MAP_COUNT=262144
OPENSEARCH_PATH_CONF="${path.conf}"

PID_DIR="/var/run/wazuh-indexer"
PID_DIR="/run/wazuh-indexer"

# Source the default env file
OPENSEARCH_ENV_FILE="${path.env}"
Expand Down
4 changes: 0 additions & 4 deletions distribution/packages/src/rpm/wazuh-indexer.rpm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ exit 0

%post
set -e
# Apply Security Settings
if [ -d %{product_dir}/plugins/opensearch-security ]; then
sh %{product_dir}/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s > %{log_dir}/install_demo_configuration.log 2>&1
fi
chown -R %{name}.%{name} %{config_dir}
chown -R %{name}.%{name} %{log_dir}
# Apply PerformanceAnalyzer Settings
Expand Down

0 comments on commit d949146

Please sign in to comment.