summaryrefslogtreecommitdiff
path: root/extra/ntp/install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-01 03:21:19 +0000
committerroot <root@rshg054.dnsready.net>2012-03-01 03:21:19 +0000
commit6f297b1cf462a11227d811a87124006c55911d63 (patch)
tree325073cc18485496bf07d32e56edf643f3b7a2bf /extra/ntp/install
parent32b05a621cb20af1bd4b7cd6f5609b7512bb20f1 (diff)
Thu Mar 1 03:21:19 UTC 2012
Diffstat (limited to 'extra/ntp/install')
-rw-r--r--extra/ntp/install15
1 files changed, 15 insertions, 0 deletions
diff --git a/extra/ntp/install b/extra/ntp/install
index 926b4126e..7581ec12f 100644
--- a/extra/ntp/install
+++ b/extra/ntp/install
@@ -1,3 +1,9 @@
+post_install() {
+ 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
+ true
+}
+
post_upgrade() {
if [[ $(vercmp $2 4.2.6.p3) -le 0 ]]; then
cat <<EOF
@@ -16,4 +22,13 @@ EOF
EOF
fi
+ if [[ $(vercmp $2 4.2.6.p5-3) -le 0 ]]; then
+ post_install
+ fi
+}
+
+post_remove() {
+ getent passwd ntp &>/dev/null && userdel ntp >/dev/null
+ getent group ntp &>/dev/null && groupdel ntp >/dev/null
+ true
}