Skip to content

Commit

Permalink
Fix empty dir case on installation
Browse files Browse the repository at this point in the history
  • Loading branch information
okynos committed Jan 31, 2022
1 parent 0be33c9 commit 1260d77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion indexer/deb/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if [ -z "$2" ]; then
echo "${USER} hard nofile 65535" >> /etc/security/limits.conf
echo "${USER} soft nofile 65535" >> /etc/security/limits.conf

if [ ! -d "${LIB_DIR}" ]; then
if [ ! -n "ls -A ${LIB_DIR} 2> /dev/null" ]; then
max_map_count=$(cat /proc/sys/vm/max_map_count)
if [ "${max_map_count}" -lt 262144 ]; then
if command -v sysctl > /dev/null 2>&1 && sysctl -w vm.max_map_count=262144 > /dev/null 2>&1; then
Expand Down
2 changes: 1 addition & 1 deletion indexer/rpm/wazuh-indexer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ if [ $1 = 1 ];then # Install
echo "bootstrap.system_call_filter: false" >> %{CONFIG_DIR}/opensearch.yml
fi

if [ ! -d "%{LIB_DIR}" ]; then
if [ ! -n "ls -A %{LIB_DIR} 2> /dev/null" ]; then
max_map_count=$(cat /proc/sys/vm/max_map_count)
if [ "${max_map_count}" -lt 262144 ]; then
if command -v sysctl > /dev/null 2>&1 && sysctl -w vm.max_map_count=262144 > /dev/null 2>&1; then
Expand Down

0 comments on commit 1260d77

Please sign in to comment.