summarylogtreecommitdiffstats
path: root/hbase.install
diff options
context:
space:
mode:
Diffstat (limited to 'hbase.install')
-rw-r--r--hbase.install13
1 files changed, 13 insertions, 0 deletions
diff --git a/hbase.install b/hbase.install
new file mode 100644
index 000000000000..2ff0a7ab31a2
--- /dev/null
+++ b/hbase.install
@@ -0,0 +1,13 @@
+post_install() {
+ getent group 'hbase' >/dev/null 2>&1 || groupadd -r 'hbase' >/dev/null
+ getent passwd 'hbase' /dev/null 2>&1 || useradd -r -g 'hbase' -d '/etc/hbase' 'hbase' >/dev/null
+
+ chown -R 'hbase:hbase' '/etc/hbase'
+ chown -R 'hbase:hbase' '/var/log/hbase'
+ chown -R 'hbase:hbase' '/var/lib/hbase'
+}
+
+post_remove() {
+ getent passwd 'hbase' >/dev/null 2>&1 && userdel 'hbase' >/dev/null
+ getent group 'hbase' >/dev/null 2>&1 && groupdel 'hbase' >/dev/null
+}