tor.service.in 784 B

12345678910111213141516171819202122232425262728
  1. [Unit]
  2. Description = Anonymizing overlay network for TCP
  3. After = syslog.target network.target nss-lookup.target
  4. [Service]
  5. Type = simple
  6. ExecStartPre = @BINDIR@/tor -f @CONFDIR@/torrc --verify-config
  7. # A torrc that has "RunAsDaemon 1" won't work with the "simple" service type;
  8. # let's explicitly override it.
  9. ExecStart = @BINDIR@/tor -f @CONFDIR@/torrc --RunAsDaemon 0
  10. ExecReload = /bin/kill -HUP ${MAINPID}
  11. KillSignal = SIGINT
  12. TimeoutSec = 30
  13. Restart = on-failure
  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. NoNewPrivileges = yes
  24. [Install]
  25. WantedBy = multi-user.target