blob: f3bbe7c715dee1151a33547943fff3af94f18261 (
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() {
getent group tinyproxy &>/dev/null || groupadd -g 186 tinyproxy >/dev/null
getent passwd tinyproxy &>/dev/null || useradd -u 186 -g tinyproxy -d / \
-c 'HTTP proxy daemon' \
-s /bin/nologin \
tinyproxy >/dev/null
if [ ! -d /run/tinyproxy ]; then
install -dm0770 -o tinyproxy -g tinyproxy /run/tinyproxy
fi
}
post_upgrade() {
post_install "$@"
if [[ $(vercmp $2 1.8.3-7) -le 0 ]]; then
post_install
chown -R tinyproxy:tinyproxy /run/tinyproxy
fi
}
post_remove() {
getent passwd tinyproxy &>/dev/null && userdel tinyproxy >/dev/null
getent group tinyproxy &>/dev/null && groupdel tinyproxy >/dev/null
true
}
|