blob: 429505a514d67ef007977bf61b8fe3e6b1b0a3d3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
pre_install() {
getent group naemon &> /dev/null || groupadd -r naemon -g 44
getent passwd naemon &> /dev/null || useradd -r -u 44 -g naemon \
-d /var/lib/naemon -s /sbin/nologin -c "Naemon" naemon
}
pre_upgrade() {
pre_install
}
pre_remove() {
if [[ -f /run/naemon/naemon.pid ]]; then
systemctl stop naemon
fi
}
post_remove() {
userdel naemon
}
|