summaryrefslogtreecommitdiffstats
path: root/distro/arch/install
blob: de23d593f736ea5a44e63e5990534d0473834e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
post_install() {
  getent group knot-resolver &>/dev/null || groupadd -r knot-resolver >/dev/null
  getent passwd knot-resolver &>/dev/null || useradd -r -g knot-resolver -d /dev/null -s /bin/false -c knot-resolver knot-resolver >/dev/null
  chown -R root:knot-resolver /etc/knot-resolver
}

post_upgrade() {
  chown -R root:knot-resolver /etc/knot-resolver
}

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