desktop/tor/tor.install
2010-11-01 12:22:32 +00:00

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
}