diff --git a/changes/ticket8368 b/changes/ticket8368 new file mode 100644 index 000000000..206a76654 --- /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 ca7c9c0fc..c0c818757 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 2780aaa51..5d7670281 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 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 \