blob: 2badf647138198efc76cb526d3f98e64feebee3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
}
|