From 3701f748d434338486e3167992e22c20ffebc0d5 Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 8 Feb 2012 12:25:45 +0100 Subject: [PATCH] remove empty data dir --- src/deb/control/postrm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/deb/control/postrm b/src/deb/control/postrm index fa0b29eef1f..59b6048a868 100755 --- a/src/deb/control/postrm +++ b/src/deb/control/postrm @@ -3,8 +3,11 @@ set -e case "$1" in remove) - # Remove logs but not the data + # Remove logs rm -rf /var/log/elasticsearch + + # remove **only** empty data dir + rmdir -p --ignore-fail-on-non-empty /var/lib/elasticsearch ;; purge)