From cae638805385ae0ef717eb21e1592aeb1d85182c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 29 Apr 2014 12:15:40 -0400 Subject: [PATCH] Put tor.service in the right place, and autoconfify it This closes 8368. --- changes/ticket8368 | 5 +++++ configure.ac | 1 + contrib/{tor.service => dist/tor.service.in} | 2 +- contrib/include.am | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changes/ticket8368 rename contrib/{tor.service => dist/tor.service.in} (90%) diff --git a/changes/ticket8368 b/changes/ticket8368 new file mode 100644 index 0000000000..206a766548 --- /dev/null +++ b/changes/ticket8368 @@ -0,0 +1,5 @@ + o Distribution: + - Include a tor.service file in contrib.dist for use with + systemd. Some distributions will be able to use this file unmodified; + others will need to tweak it, or write their own. Patch from + Jamie Nguyen; resolves ticket 8368. diff --git a/configure.ac b/configure.ac index ca7c9c0fcc..c0c8187578 100644 --- a/configure.ac +++ b/configure.ac @@ -1561,6 +1561,7 @@ AC_CONFIG_FILES([ contrib/operator-tools/tor.logrotate contrib/dist/tor.sh contrib/dist/torctl + contrib/dist/tor.service src/config/torrc.sample ]) diff --git a/contrib/tor.service b/contrib/dist/tor.service.in similarity index 90% rename from contrib/tor.service rename to contrib/dist/tor.service.in index 2780aaa513..5d7670281b 100644 --- a/contrib/tor.service +++ b/contrib/dist/tor.service.in @@ -4,7 +4,7 @@ After = syslog.target network.target nss-lookup.target [Service] Type = simple -ExecStart = /usr/bin/tor -f /etc/tor/torrc +ExecStart = @BINDIR@/tor -f @CONFDIR@/torrc ExecReload = /bin/kill -HUP ${MAINPID} KillSignal = SIGINT TimeoutSec = 30 diff --git a/contrib/include.am b/contrib/include.am index 0120798614..ede980678e 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 \