OpenSearch/pkg/debian/control/postrm

31 lines
641 B
Plaintext
Raw Normal View History

2011-08-10 05:04:29 -04:00
#!/bin/sh
set -e
case "$1" in
remove)
# Remove logs and data
rm -rf /var/log/elasticsearch /var/lib/elasticsearch
;;
purge)
# Remove service
update-rc.d elasticsearch remove >/dev/null || true
# Remove logs and data
rm -rf /var/log/elasticsearch /var/lib/elasticsearch
# Remove user/group
deluser elasticsearch || true
delgroup elasticsearch || true
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
# Nothing to do here
;;
*)
echo "$0 called with unknown argument \`$1'" >&2
exit 1
;;
esac