aboutsummaryrefslogtreecommitdiff
path: root/contrib/dist
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-29 12:15:40 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-29 13:17:30 -0400
commitcae638805385ae0ef717eb21e1592aeb1d85182c (patch)
tree25cb84d3825215f9df528eb8a14245e1b27550fb /contrib/dist
parenta42e81eea10363654cde5724337c4aaea2bb40d0 (diff)
downloadtor-cae638805385ae0ef717eb21e1592aeb1d85182c.tar
tor-cae638805385ae0ef717eb21e1592aeb1d85182c.tar.gz
Put tor.service in the right place, and autoconfify it
This closes 8368.
Diffstat (limited to 'contrib/dist')
-rw-r--r--contrib/dist/tor.service.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/dist/tor.service.in b/contrib/dist/tor.service.in
new file mode 100644
index 000000000..5d7670281
--- /dev/null
+++ b/contrib/dist/tor.service.in
@@ -0,0 +1,21 @@
+[Unit]
+Description = Anonymizing overlay network for TCP
+After = syslog.target network.target nss-lookup.target
+
+[Service]
+Type = simple
+ExecStart = @BINDIR@/tor -f @CONFDIR@/torrc
+ExecReload = /bin/kill -HUP ${MAINPID}
+KillSignal = SIGINT
+TimeoutSec = 30
+Restart = on-failure
+LimitNOFILE = 32768
+
+# Hardening
+PrivateTmp = yes
+DeviceAllow = /dev/null rw
+DeviceAllow = /dev/urandom r
+InaccessibleDirectories = /home
+
+[Install]
+WantedBy = multi-user.target