diff options
Diffstat (limited to 'community/openntpd/openntpd.install')
-rw-r--r-- | community/openntpd/openntpd.install | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/community/openntpd/openntpd.install b/community/openntpd/openntpd.install index 4f42aeb1f..5b440ee2f 100644 --- a/community/openntpd/openntpd.install +++ b/community/openntpd/openntpd.install @@ -1,24 +1,18 @@ -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 + getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null + getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null + systemd-tmpfiles --create openntpd.conf + true } post_upgrade() { - createuser } post_remove() { - userdel ntp >/dev/null + getent passwd ntp &>/dev/null && userdel ntp >/dev/null + getent group ntp &>/dev/null && groupdel ntp >/dev/null + true } # vim: ts=2 sw=2 et ft=sh |