summaryrefslogtreecommitdiff
path: root/pcr/knot/install
blob: 90ece5b423ff4b78e939f77705bfa14047badc42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
post_install() {
  getent group knot &>/dev/null || groupadd -r knot >/dev/null
  getent passwd knot &>/dev/null || useradd -r -g knot -d /dev/null -s /bin/false -c knot knot >/dev/null
  chown knot:knot /var/lib/knot
  chmod 700 /var/lib/knot
}

post_remove() {
  getent passwd knot &>/dev/null && userdel knot >/dev/null
  getent group knot &>/dev/null && groupdel knot >/dev/null
  true
}