diff options
author | Tomasz Torcz <tomek@pipebreaker.pl> | 2015-01-09 23:42:16 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-01-11 11:14:32 -0500 |
commit | a8999acc3bca05f1aaa23399c7d5f7a5e51789a4 (patch) | |
tree | 9ee5396f4d203b59a37fd9ae902dc98c6511d7a3 /src/or/main.c | |
parent | 2aa2d0a1c559bcc2f2198ab7df37ab0a33605904 (diff) | |
download | tor-a8999acc3bca05f1aaa23399c7d5f7a5e51789a4.tar.gz tor-a8999acc3bca05f1aaa23399c7d5f7a5e51789a4.zip |
fix and enable systemd watchdog
There were following problems:
- configure.ac wrongly checked for defined HAVE_SYSTEMD; this
wasn't working, so the watchdog code was not compiled in.
Replace library search with explicit version check
- sd_notify() watchdog call was unsetting NOTIFY_SOCKET from env;
this means only first "watchdog ping" was delivered, each
subsequent one did not have socket to be sent to and systemd
was killing service
- after those fixes, enable Watchdog in systemd unit with one
minute intervals
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c index 1b439041b9..bf4e6db7c1 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1776,7 +1776,7 @@ static periodic_timer_t *systemd_watchdog_timer = NULL; static void systemd_watchdog_callback(periodic_timer_t *timer, void *arg) { - sd_notify(1, "WATCHDOG=1"); + sd_notify(0, "WATCHDOG=1"); } #endif |