mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 18:42:12 +08:00
20 lines
713 B
Plaintext
20 lines
713 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."
|
|
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() {
|
|
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
|
|
}
|