tor.service.in 1.0 KB

1234567891011121314151617181920212223242526272829
  1. # tor.service -- this systemd configuration file for Tor sets up a
  2. # relatively conservative, hardened Tor service. You may need to
  3. # edit it if you are making changes to your Tor configuration that it
  4. # does not allow. Package maintainers: this should be a starting point
  5. # for your tor.service; it is not the last point.
  6. [Unit]
  7. Description = Anonymizing overlay network for TCP
  8. After = syslog.target network.target nss-lookup.target
  9. [Service] Type = notify NotifyAccess = all ExecStartPre = @BINDIR@/tor
  10. -f @CONFDIR@/torrc --verify-config ExecStart = @BINDIR@/tor -f
  11. @CONFDIR@/torrc ExecReload = /bin/kill -HUP ${MAINPID} KillSignal =
  12. SIGINT TimeoutSec = 30 Restart = on-failure WatchdogSec = 1m
  13. LimitNOFILE = 32768
  14. # Hardening
  15. PrivateTmp = yes
  16. PrivateDevices = yes
  17. ProtectHome = yes
  18. ProtectSystem = full
  19. ReadOnlyDirectories = /
  20. ReadWriteDirectories = -@LOCALSTATEDIR@/lib/tor
  21. ReadWriteDirectories = -@LOCALSTATEDIR@/log/tor
  22. NoNewPrivileges = yes
  23. CapabilityBoundingSet = CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE
  24. [Install]
  25. WantedBy = multi-user.target