summaryrefslogtreecommitdiff
path: root/community/openntpd/openntpd.install
blob: 4f42aeb1fbae53e1558f1d4de380ee569a3676ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
createuser() {
  if ! getent group ntp >/dev/null; then
    groupadd -g 87 ntp
  fi

  if ! getent passwd ntp >/dev/null; then
    useradd -g ntp -u 87 -d /var/empty -s /bin/false -c 'Network Time Protocol' ntp
  fi
}

post_install() {
  createuser
  systemd-tmpfiles --create openntpd.conf
}

post_upgrade() {
  createuser
}

post_remove() {
  userdel ntp >/dev/null
}

# vim: ts=2 sw=2 et ft=sh