---
name: openntpd
version: 4.6_2,2
origin: net/openntpd
comment: OpenBSD's Network Time Protocol daemon
arch: freebsd:9:x86:64
www: http://www.openntpd.org/
maintainer: naddy@FreeBSD.org
prefix: /usr/local
licenselogic: single
flatsize: 57813
desc: |
  OpenBSD's ntpd.

  The ntpd daemon implements the Simple Network Time Protocol version 4 as
  described in RFC 2030 and the Network Time Protocol version 3 as de-
  scribed in RFC 1305.  It can synchronize the local clock to one or more
  remote NTP servers and act as NTP server itself, redistributing the local
  time.

  WWW: http://www.openntpd.org/
categories: [net]
users: [_ntp]
groups: [_ntp]
files:
  /usr/local/etc/rc.d/openntpd: 5cff06a9e70ee3b87209397be8f6bb59d32577a2daa7451a79066910a7f3c999
  /usr/local/man/man5/ntpd.conf.5.gz: 6f96497b22ad2b262e3429c88a5f96f1903c97b22965844178d0251bb7acb41a
  /usr/local/man/man8/ntpd.8.gz: 77997fc70032ddffc5e2af9e5b95208570dc9f3a1799635e02c88d9ccfe2ea63
  /usr/local/sbin/ntpd: 078588af276aeaeea1d93453f8a8e59b7a1ddf6da36ce7732ed6b91f84ac46f4
  /usr/local/share/examples/openntpd/ntpd.conf: 7f543776de2d4f92ea02571c9a71988f8aee2751d27641c7e7a13fba1fed1645
directories:
  /usr/local/share/examples/openntpd/: n
scripts:
  post-install: |
    echo "===> Creating users and/or groups."
    if ! /usr/sbin/pw groupshow _ntp >/dev/null 2>&1; then  echo "Creating group '_ntp' with gid '123'.";  /usr/sbin/pw groupadd _ntp -g 123; else echo "Using existing group '_ntp'."; fi
    if ! /usr/sbin/pw usershow _ntp >/dev/null 2>&1; then  echo "Creating user '_ntp' with uid '123'.";  /usr/sbin/pw useradd _ntp -u 123 -g 123  -c "NTP Daemon" -d /var/empty -s /usr/sbin/nologin;  else echo "Using existing user '_ntp'."; fi
    if [ ! -f /usr/local/etc/ntpd.conf ]; then cp /usr/local/share/examples/openntpd/ntpd.conf /usr/local/etc; fi
    cd /usr/local
  pre-deinstall: |
    if cmp -s /usr/local/etc/ntpd.conf /usr/local/share/examples/openntpd/ntpd.conf; then rm -f /usr/local/etc/ntpd.conf; fi
    if /usr/sbin/pw usershow _ntp >/dev/null 2>&1; then  echo "==> You should manually remove the \"_ntp\" user. "; fi
    cd /usr/local
  post-deinstall: |
    cd /usr/local
