mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-11 05:03:34 +01:00
bd0e38dcfe
This commit upstreams the Debian package setting of 60 seconds for TimeoutStopSec, but applies it to startup and shutdown. Part of 28113.
36 lines
1017 B
SYSTEMD
36 lines
1017 B
SYSTEMD
# tor.service -- this systemd configuration file for Tor sets up a
|
|
# relatively conservative, hardened Tor service. You may need to
|
|
# edit it if you are making changes to your Tor configuration that it
|
|
# does not allow. Package maintainers: this should be a starting point
|
|
# for your tor.service; it is not the last point.
|
|
|
|
[Unit]
|
|
Description=Anonymizing overlay network for TCP
|
|
After=syslog.target network.target nss-lookup.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
NotifyAccess=all
|
|
ExecStartPre=@BINDIR@/tor -f @CONFDIR@/torrc --verify-config
|
|
ExecStart=@BINDIR@/tor -f @CONFDIR@/torrc
|
|
ExecReload=/bin/kill -HUP ${MAINPID}
|
|
KillSignal=SIGINT
|
|
TimeoutSec=60
|
|
Restart=on-failure
|
|
WatchdogSec=1m
|
|
LimitNOFILE=32768
|
|
|
|
# Hardening
|
|
PrivateTmp=yes
|
|
PrivateDevices=yes
|
|
ProtectHome=yes
|
|
ProtectSystem=full
|
|
ReadOnlyDirectories=/
|
|
ReadWriteDirectories=-@LOCALSTATEDIR@/lib/tor
|
|
ReadWriteDirectories=-@LOCALSTATEDIR@/log/tor
|
|
NoNewPrivileges=yes
|
|
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|