tor.service.in 742 B

1234567891011121314151617181920212223242526272829
  1. [Unit]
  2. Description = Anonymizing overlay network for TCP
  3. After = syslog.target network.target nss-lookup.target
  4. [Service]
  5. Type = notify
  6. NotifyAccess = all
  7. ExecStartPre = @BINDIR@/tor -f @CONFDIR@/torrc --verify-config
  8. ExecStart = @BINDIR@/tor -f @CONFDIR@/torrc
  9. ExecReload = /bin/kill -HUP ${MAINPID}
  10. KillSignal = SIGINT
  11. TimeoutSec = 30
  12. Restart = on-failure
  13. WatchdogSec = 1m
  14. LimitNOFILE = 32768
  15. # Hardening
  16. PrivateTmp = yes
  17. DeviceAllow = /dev/null rw
  18. DeviceAllow = /dev/urandom r
  19. InaccessibleDirectories = /home
  20. ReadOnlyDirectories = /
  21. ReadWriteDirectories = @LOCALSTATEDIR@/lib/tor
  22. ReadWriteDirectories = @LOCALSTATEDIR@/log/tor
  23. ReadWriteDirectories = @LOCALSTATEDIR@/run/tor
  24. NoNewPrivileges = yes
  25. [Install]
  26. WantedBy = multi-user.target