summaryrefslogtreecommitdiff
path: root/community/chrony/chrony.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/chrony/chrony.install')
-rw-r--r--community/chrony/chrony.install18
1 files changed, 18 insertions, 0 deletions
diff --git a/community/chrony/chrony.install b/community/chrony/chrony.install
new file mode 100644
index 000000000..2badf6471
--- /dev/null
+++ b/community/chrony/chrony.install
@@ -0,0 +1,18 @@
+post_install() {
+ getent group chrony &>/dev/null || groupadd -g 183 chrony >/dev/null
+ getent passwd chrony &>/dev/null || useradd -u 183 -g chrony -d /var/lib/chrony -c 'Network Time Protocol' -s /bin/false chrony >/dev/null
+ true
+}
+
+post_upgrade() {
+ if [[ $(vercmp $2 1.29.1-2) -le 0 ]]; then
+ post_install
+ chown -R 183:183 /var/lib/chrony
+ fi
+}
+
+post_remove() {
+ getent passwd chrony &>/dev/null && userdel chrony >/dev/null
+ getent group chrony &>/dev/null && groupdel chrony >/dev/null
+ true
+}