summaryrefslogtreecommitdiff
path: root/apache-spark/apache-spark.install
blob: 7aa03480833c1d7c3c113850f075ca9f9cdeb5f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
post_install() {
  groupadd -r -f apache-spark
  useradd -r -g apache-spark -s /usr/bin/nologin -d /var/lib/apache-spark apache-spark || true

  [[ ! -d /var/lib/apache-spark/work ]] &&
  install -d /var/lib/apache-spark/work

  chown -R apache-spark:apache-spark /var/{lib,log}/apache-spark
}

post_remove() {
  /usr/sbin/userdel apache-spark
  /usr/sbin/groupdel apache-spark
}