tor.service.in 1017 B

123456789101112131415161718192021222324252627282930313233343536
  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]
  10. Type=notify
  11. NotifyAccess=all
  12. ExecStartPre=@BINDIR@/tor -f @CONFDIR@/torrc --verify-config
  13. ExecStart=@BINDIR@/tor -f @CONFDIR@/torrc
  14. ExecReload=/bin/kill -HUP ${MAINPID}
  15. KillSignal=SIGINT
  16. TimeoutSec=60
  17. Restart=on-failure
  18. WatchdogSec=1m
  19. LimitNOFILE=32768
  20. # Hardening
  21. PrivateTmp=yes
  22. PrivateDevices=yes
  23. ProtectHome=yes
  24. ProtectSystem=full
  25. ReadOnlyDirectories=/
  26. ReadWriteDirectories=-@LOCALSTATEDIR@/lib/tor
  27. ReadWriteDirectories=-@LOCALSTATEDIR@/log/tor
  28. NoNewPrivileges=yes
  29. CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE
  30. [Install]
  31. WantedBy=multi-user.target