blob: 3ee05942f75ee9462bc6b7ad4749e61c17b31d66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
post_install() {
if ! getent group rwhod &>/dev/null; then
groupadd -r rwhod &>/dev/null
fi
if ! getent passwd rwhod &>/dev/null; then
useradd -s /bin/false -d /var/spool/rwho -g rwhod -M -r rwhod &>/dev/null
fi
chown -R rwhod:rwhod /var/spool/rwho
}
post_upgrade() {
post_install $1
}
pre_remove() {
if getent passwd rwhod &>/dev/null; then
userdel rwhod &>/dev/null
fi
if getent group rwhod &>/dev/null; then
groupdel rwhod &>/dev/null
fi
rm -rf /var/spool/rwhod/* &>/dev/null || true
}
|