Skip to content

Commit

Permalink
Fix errors and add .new prefix to /etc/init.d/wazuh-indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
f-galland committed Sep 16, 2024
1 parent 3bd87c5 commit d116c97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion distribution/packages/src/deb/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ tmp_dir=/var/log/wazuh-indexer/tmp
# Create needed directories
mkdir -p ${tmp_dir}

# Create config files if not already present
# Create config files only if not already present
cp -n /etc/init.d/wazuh-indexer.new /etc/init.d/wazuh-indexer
cp -n ${config_dir}/jvm.options.new ${config_dir}/jvm.options
cp -n ${config_dir}/opensearch.yml.new ${config_dir}/opensearch.yml
cp -n ${config_dir}/opensearch-security/roles.yml.new ${config_dir}/opensearch-security/roles.yml
Expand Down
7 changes: 3 additions & 4 deletions distribution/packages/src/deb/debmake_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,15 @@ done

# Append ".new" to configuration file names
dot_new_config_files=()
dot_new_config_files+=("${buildroot}/etc/init.d/${name}")
dot_new_config_files+=("${buildroot}/${config_dir}/jvm.options")
dot_new_config_files+=("${buildroot}/${config_dir}/opensearch.yml")
dot_new_config_files+=("${buildroot}/${config_dir}/opensearch-security/roles.yml")
dot_new_config_files+=("${buildroot}/${config_dir}/opensearch-security/internal_users.yml")

for i in "${dot_new_config_files}"
for i in "${dot_new_config_files[@]}"
do
mv "$i" "$i".new
mv "$i" "$i.new"
done



exit 0

0 comments on commit d116c97

Please sign in to comment.