summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac7
-rw-r--r--contrib/dist/tor.service.in1
-rw-r--r--src/or/main.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 1fd5960366..dedfb7e5bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,6 +136,9 @@ fi
AC_SUBST(TOR_SYSTEMD_CFLAGS)
AC_SUBST(TOR_SYSTEMD_LIBS)
+PKG_CHECK_MODULES(SYSTEMD209, [systemd >= 209],
+ [AC_DEFINE(HAVE_SYSTEMD_209,1,[Have systemd v209 or more])], [])
+
if test x$enable_systemd = xyes -a x$have_systemd != xyes ; then
AC_MSG_ERROR([Explicitly requested systemd support, but systemd not found])
fi
@@ -155,10 +158,6 @@ cpu workers lock up here, so I will disable threads.])
esac
fi
-ifdef([HAVE_SYSTEMD], [
-AC_SEARCH_LIBS([sd_watchdog_enabled], [systemd-daemon],
- [AC_DEFINE(HAVE_SYSTEMD_209,1,[Have systemd v209 or more])], [])
-])
case $host in
*-*-solaris* )
diff --git a/contrib/dist/tor.service.in b/contrib/dist/tor.service.in
index 607615afa2..f50075da6f 100644
--- a/contrib/dist/tor.service.in
+++ b/contrib/dist/tor.service.in
@@ -11,6 +11,7 @@ ExecReload = /bin/kill -HUP ${MAINPID}
KillSignal = SIGINT
TimeoutSec = 30
Restart = on-failure
+WatchdogSec = 1m
LimitNOFILE = 32768
# Hardening
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