]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add contrib/tor.service for use with systemd
authorJamie Nguyen <j@jamielinux.com>
Mon, 21 Apr 2014 13:47:44 +0000 (14:47 +0100)
committerNick Mathewson <nickm@torproject.org>
Tue, 29 Apr 2014 17:17:29 +0000 (13:17 -0400)
changes/bug8368 [new file with mode: 0644]
contrib/tor.service [new file with mode: 0644]

diff --git a/changes/bug8368 b/changes/bug8368
new file mode 100644 (file)
index 0000000..fa3991c
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor features:
+    - Add a systemd service file (tor.service) that can be installed by
+      Linux distributions that make use of the systemd init daemon.
+      Fixes bug 8368.
diff --git a/contrib/tor.service b/contrib/tor.service
new file mode 100644 (file)
index 0000000..2780aaa
--- /dev/null
@@ -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