From a42e81eea10363654cde5724337c4aaea2bb40d0 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Mon, 21 Apr 2014 14:47:44 +0100 Subject: Add contrib/tor.service for use with systemd --- changes/bug8368 | 4 ++++ contrib/tor.service | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 changes/bug8368 create mode 100644 contrib/tor.service diff --git a/changes/bug8368 b/changes/bug8368 new file mode 100644 index 000000000..fa3991c3a --- /dev/null +++ b/changes/bug8368 @@ -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 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 -- cgit v1.2.3