Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion distribution/packages/src/common/scripts/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# On RedHat,
# $1=0 : indicates a removal
# $1=1 : indicates an upgrade

REMOVE_DIRS=false
REMOVE_USER_AND_GROUP=false

Expand Down Expand Up @@ -55,6 +54,13 @@ if [ "$REMOVE_DIRS" = "true" ]; then
echo " OK"
fi

# plugins may have contained bin files
if [ -d /usr/share/elasticsearch/bin ]; then
echo -n "Deleting plugin bin directories..."
rm -rf /usr/share/elasticsearch/bin
echo " OK"
fi

if [ -d /var/run/elasticsearch ]; then
echo -n "Deleting PID directory..."
rm -rf /var/run/elasticsearch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ public void test40StartServer() throws Exception {
public void test50Remove() throws Exception {
assumeThat(installation, is(notNullValue()));

// add fake bin directory as if a plugin was installed
Files.createDirectories(installation.bin.resolve("myplugin"));

remove(distribution());

// removing must stop the service
Expand Down