aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJamie Nguyen <j@jamielinux.com>2014-04-21 14:47:44 +0100
committerNick Mathewson <nickm@torproject.org>2014-04-29 13:17:29 -0400
commita42e81eea10363654cde5724337c4aaea2bb40d0 (patch)
treef074afbeefdd937d6497e5da57572ea9eace7556 /contrib
parent0514bcd37c6e6e0eb3f3c47da94cb182d01ef15f (diff)
downloadtor-a42e81eea10363654cde5724337c4aaea2bb40d0.tar
tor-a42e81eea10363654cde5724337c4aaea2bb40d0.tar.gz
Add contrib/tor.service for use with systemd
Diffstat (limited to 'contrib')
-rw-r--r--contrib/tor.service21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/tor.service b/contrib/tor.service
new file mode 100644
index 000000000..2780aaa51
--- /dev/null
+++ b/contrib/tor.service
@@ -0,0 +1,21 @@
+[Unit]
+Description = Anonymizing overlay network for TCP
+After = syslog.target network.target nss-lookup.target
+
+[Service]
+Type = simple
+ExecStart = /usr/bin/tor -f /etc/tor/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