summaryrefslogtreecommitdiff
path: root/community/openntpd/openntpd.install
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-11-18 17:12:10 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2012-11-18 17:12:10 +0100
commitfb5b6b28f363547abcbfa026fcae050236861425 (patch)
tree850e29f1f9f42ada20e1c6818316988505970dae /community/openntpd/openntpd.install
parent67eabbfbd9364ee57f122c9ec9a03dd61bba850b (diff)
parentab63d8d49f68847a68c2ba0014bf0d3338cb3df6 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/ettercap/PKGBUILD community/mplayer2/PKGBUILD community/nginx/PKGBUILD community/pidgin-libnotify/PKGBUILD core/util-linux/PKGBUILD extra/aspell-pt/PKGBUILD extra/glpk/PKGBUILD extra/libgdiplus/PKGBUILD extra/llvm/PKGBUILD extra/mesa/PKGBUILD extra/rhythmbox/PKGBUILD extra/texmacs/PKGBUILD
Diffstat (limited to 'community/openntpd/openntpd.install')
-rw-r--r--community/openntpd/openntpd.install20
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