summarylogtreecommitdiffstats
path: root/hbase.install
blob: 2ff0a7ab31a2ccfb58a489ceae9cfe438606ceea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
}