blob: 708ca53af187ffe3c8a8fd3c97a1ec94b8bef27b (
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 || groupadd jetty &> /dev/null
getent passwd 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_remove() {
if getent passwd jetty &> /dev/null; then
userdel jetty
fi
if getent group jetty &> /dev/null; then
groupdel jetty
fi
}
|