Skip to content

Commit

Permalink
Fixed permissions, fixed purge on Debian
Browse files Browse the repository at this point in the history
  • Loading branch information
okynos committed Jan 28, 2022
1 parent af04e4f commit 759aff2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 3 additions & 4 deletions indexer/deb/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,15 @@ if [ -z "$2" ]; then

max_map_count=$(cat /proc/sys/vm/max_map_count)
if [ "${max_map_count}" -lt 262144 ]; then
if command -v sysctl; then
sysctl -w vm.max_map_count=262144 > /dev/null 2>&1
configure_indexer()
if command -v sysctl > /dev/null 2>&1 && sysctl -w vm.max_map_count=262144 > /dev/null 2>&1; then
configure_indexer
else
echo "[WARNING] Sysctl command not available and vm.max_map_count is lower than 262144"
echo "The security admin default configuration cannot run"
echo "Increase vm.max_map_count to 262144 and launch security config tool"
fi
else
configure_indexer()
configure_indexer
fi

else
Expand Down
2 changes: 1 addition & 1 deletion indexer/deb/debian/prerm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ REMOVE_SERVICE=false
case "$1" in

# Debian ####################################################
remove)
remove|purge)
STOP_REQUIRED=true
REMOVE_SERVICE=true
;;
Expand Down
5 changes: 5 additions & 0 deletions indexer/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ override_dh_install:
chown $(USER):$(GROUP) -R $(TARGET_DIR)
chmod ug+x $(TARGET_DIR)$(INSTALLATION_DIR)/*

# -----------------------------------------------------------------------------

override_dh_fixperms:
dh_fixperms
# Set files permissions
chmod 750 $(TARGET_DIR)$(CONFIG_DIR)
chmod 750 $(TARGET_DIR)$(LIB_DIR)
Expand Down Expand Up @@ -1020,6 +1024,7 @@ override_dh_install:
chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/jdk/jmods/jdk.jconsole.jmod
chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/jdk/jmods/java.instrument.jmod


# -----------------------------------------------------------------------------

override_dh_strip:
Expand Down

0 comments on commit 759aff2

Please sign in to comment.