summarylogtreecommitdiffstats
path: root/tor.install
blob: 02ad0185b79f966368ac295903c1b2ffcb775c84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
post_install() {
  echo "==> "
  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 "==> "
  post_upgrade
}

post_upgrade() {
  systemd-sysusers tor.conf
  systemd-tmpfiles --create tor.conf
  chown -R tor:tor /etc/tor
  chmod -R 750 /etc/tor
}

pre_remove() {
  getent passwd tor &>/dev/null && userdel tor &> /dev/null
  getent group tor &>/dev/null && groupdel tor &> /dev/null
}