blob: 4ff8939096e3d8eaebc4834bcd0098499cc7ec6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
pre_install() {
# create user and group
/usr/bin/getent group linx &> /dev/null || /usr/bin/groupadd -r linx &> /dev/null
/usr/bin/getent passwd linx &> /dev/null || /usr/bin/useradd -r -g linx -s /usr/bin/nologin -d /usr/share/webapps/linx-server linx &> /dev/null
}
post_install() {
# chown directories
/usr/bin/chown -R linx:linx /usr/share/webapps/linx-server
}
post_remove() {
# remove user and group
/usr/bin/getent passwd linx &> /dev/null && /usr/bin/userdel linx &> /dev/null
}
|