25 lines
543 B
Plaintext
25 lines
543 B
Plaintext
post_install() {
|
|
if ! getent group threeproxy &>/dev/null; then
|
|
groupadd -r threeproxy >& /dev/null
|
|
fi
|
|
if ! getent passwd threeproxy &>/dev/null; then
|
|
useradd -r -d /var/log/3proxy -g threeproxy -s /bin/false threeproxy
|
|
fi
|
|
|
|
chown threeproxy:threeproxy /run/3proxy
|
|
chown threeproxy:threeproxy /var/log/3proxy
|
|
}
|
|
|
|
post_upgrade() {
|
|
post_install $1
|
|
}
|
|
|
|
post_remove() {
|
|
if getent passwd threeproxy &>/dev/null; then
|
|
userdel threeproxy >/dev/null
|
|
fi
|
|
if getent group threeproxy &>/dev/null; then
|
|
groupdel threeproxy >/dev/null
|
|
fi
|
|
}
|