freebsd-ports/net/openntpd/pkg-install
Christian Weisgerber f8e7096728 Initial import of openntpd (OpenBSD's ntpd, portable version).
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.
2004-07-11 17:18:24 +00:00

35 lines
586 B
Bash

#!/bin/sh
# $FreeBSD$
#
if [ "$2" != "PRE-INSTALL" ]; then
exit 0
fi
USER=_ntp
GROUP=${USER}
UID=123
GID=${UID}
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-s "/sbin/nologin" -d "/var/empty" \
-c "NTP daemon"; \
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
exit 0