summarylogtreecommitdiffstats
path: root/chronograf.install
blob: a80b7937a6783f98b3446894eda0674f9eb2e5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
post_install() {
  post_upgrade
  passwd -l chronograf &>/dev/null
}

post_upgrade() {
  getent group chronograf >/dev/null || groupadd -r chronograf
  getent passwd chronograf >/dev/null || useradd -c 'chronograf' -g chronograf -d '/var/lib/chronograf' -r -m -s /bin/false chronograf

  mkdir -p /var/lib/chronograf
  chown chronograf:chronograf /var/lib/chronograf
}