Skip to content
Snippets Groups Projects
Commit 74a8555d authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Merge remote-tracking branch 'intrigeri/bug12731-systemd-no-run-as-daemon' into maint-0.2.5

Conflicts:
	contrib/dist/tor.service.in
parents 88590ed3 8b470ee4
No related branches found
Tags tor-0.2.1.21
No related merge requests found
o Distribution:
- Explicitly disable RunAsDaemon in the systemd unit file.
Our current systemd unit uses "Type = simple", so systemd does
not expect tor to fork. If the user has "RunAsDaemon 1" in their
torrc, then things won't work as expected. This is e.g. the case
on Debian (and derivatives), since there we pass
"--defaults-torrc /usr/share/tor/tor-service-defaults-torrc"
(that contains "RunAsDaemon 1") by default.
Patch by intrigeri; resolves ticket 12731.
......@@ -5,7 +5,9 @@ After = syslog.target network.target nss-lookup.target
[Service]
Type = simple
ExecStartPre = @BINDIR@/tor -f @CONFDIR@/torrc --verify-config
ExecStart = @BINDIR@/tor -f @CONFDIR@/torrc
# A torrc that has "RunAsDaemon 1" won't work with the "simple" service type;
# let's explicitly override it.
ExecStart = @BINDIR@/tor -f @CONFDIR@/torrc --RunAsDaemon 0
ExecReload = /bin/kill -HUP ${MAINPID}
KillSignal = SIGINT
TimeoutSec = 30
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment