Browse Source

Put tor.service in the right place, and autoconfify it

This closes 8368.
Nick Mathewson 10 years ago
parent
commit
cae6388053
4 changed files with 8 additions and 1 deletions
  1. 5 0
      changes/ticket8368
  2. 1 0
      configure.ac
  3. 1 1
      contrib/dist/tor.service.in
  4. 1 0
      contrib/include.am

+ 5 - 0
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.

+ 1 - 0
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
 ])
 

+ 1 - 1
contrib/tor.service → 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

+ 1 - 0
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			\