summaryrefslogtreecommitdiff
path: root/community/darkstat/darkstat.install
blob: fa0ccea4884cac5365c317c3aed4d8a7288b74dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
daemon_name=darkstat
daemon_chroot=/var/"$daemon_name"

post_install() {
  if [ ! -d "$daemon_chroot" ]; then
    install -d "$daemon_chroot"
  fi
  /usr/sbin/useradd \
    --system \
    --home "$daemon_chroot" \
    --shell /bin/false \
    --no-user-group \
    --gid nobody "$daemon_name"
  chown -R "$daemon_name":nobody "$daemon_chroot"
}

post_remove() {
  /usr/sbin/userdel "$daemon_name"
}