summarylogtreecommitdiffstats
path: root/influxdb.install
blob: 8d0db568fc83bcd0f4093d8004feaaf0bfd40c37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
post_install() {
  post_upgrade
}

post_upgrade() {
  # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files
  getent group influxdb >/dev/null || groupadd -r influxdb
  getent passwd influxdb >/dev/null || useradd -c 'InfluxDB' -r -g influxdb -d '/var/lib/influxdb' -m -s /bin/bash influxdb
  mkdir -p /var/lib/influxdb/{db,raft,hh}
  chown influxdb:influxdb -R /var/lib/influxdb

  mkdir -p /var/log/influxdb
  chown influxdb:influxdb -R /var/log/influxdb
}