mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
25 lines
988 B
Plaintext
25 lines
988 B
Plaintext
post_install() {
|
|
echo "-> Tor has been preconfigured to run as a client only."
|
|
echo "-> Tor is experimental software. Do not rely on it for strong anonymity."
|
|
echo "-> "
|
|
echo "-> You can set custom file descriptor ulimits for tor in"
|
|
echo "-> '/etc/conf.d/tor' using the 'TOR_MAX_FD' variable."
|
|
groupadd -g 43 tor &>/dev/null
|
|
useradd -u 43 -g tor -d /var/lib/tor -s /bin/false tor &> /dev/null
|
|
chown tor:tor var/lib/tor &> /dev/null
|
|
chmod 700 var/lib/tor &> /dev/null
|
|
}
|
|
|
|
post_upgrade() {
|
|
echo "-> You can now set custom file descriptor ulimits for tor in"
|
|
echo "-> '/etc/conf.d/tor' using the 'TOR_MAX_FD' variable."
|
|
getent group tor &>/dev/null || groupadd -g 43 tor &>/dev/null
|
|
getent passwd tor &>/dev/null || useradd -u 43 -g tor -d /var/lib/tor -s /bin/false tor &> /dev/null
|
|
chown tor:tor var/lib/tor &> /dev/null
|
|
}
|
|
|
|
pre_remove() {
|
|
getent passwd tor &>/dev/null && userdel tor &> /dev/null
|
|
getent group tor &>/dev/null && groupdel tor &> /dev/null
|
|
}
|