blob: 19aac207d6cbf6bf7718b813cf891d6c6bcf7c22 (
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
|
post_install() {
groupadd jetty &> /dev/null
useradd -g jetty -d /usr/share/jetty -s /bin/false jetty &> /dev/null
chown -R jetty:jetty /usr/share/jetty
chown -R jetty:jetty /var/log/jetty
chown -R jetty:jetty /var/lib/jetty/webapps
}
post_upgrade(){
getent group jetty > /dev/null 2>&1 || groupadd jetty &> /dev/null
getent passwd jetty > /dev/null 2>&1 || useradd -g jetty -d /usr/share/jetty -s /bin/false jetty &> /dev/null
chown -R jetty:jetty /usr/share/jetty
chown -R jetty:jetty /var/log/jetty
chown -R jetty:jetty /var/lib/jetty/webapps
}
post_remove() {
if getent passwd jetty > /dev/null 2>&1; then
userdel jetty
fi
if getent group jetty > /dev/null 2>&1; then
groupdel jetty
fi
}
|