From cae638805385ae0ef717eb21e1592aeb1d85182c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 29 Apr 2014 12:15:40 -0400 Subject: Put tor.service in the right place, and autoconfify it This closes 8368. --- contrib/dist/tor.service.in | 21 +++++++++++++++++++++ contrib/include.am | 1 + contrib/tor.service | 21 --------------------- 3 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 contrib/dist/tor.service.in delete mode 100644 contrib/tor.service (limited to 'contrib') 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 diff --git a/contrib/include.am b/contrib/include.am index 012079861..ede980678 100644 --- a/contrib/include.am +++ b/contrib/include.am @@ -5,6 +5,7 @@ EXTRA_DIST+= \ contrib/dist/suse/tor.sh.in \ contrib/dist/tor.sh \ contrib/dist/torctl \ + contrib/dist/tor.service.in \ contrib/operator-tools/linux-tor-prio.sh \ contrib/operator-tools/tor-exit-notice.html \ contrib/or-tools/exitlist \ diff --git a/contrib/tor.service b/contrib/tor.service deleted file mode 100644 index 2780aaa51..000000000 --- a/contrib/tor.service +++ /dev/null @@ -1,21 +0,0 @@ -[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