tor.service.in 735 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. PrivateDevices = yes
  18. ProtectHome = yes
  19. ProtectSystem = full
  20. ReadOnlyDirectories = /
  21. ReadWriteDirectories = -@LOCALSTATEDIR@/lib/tor
  22. ReadWriteDirectories = -@LOCALSTATEDIR@/log/tor
  23. NoNewPrivileges = yes
  24. CapabilityBoundingSet = CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE
  25. [Install]
  26. WantedBy = multi-user.target