summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/timesync/timesyncd.c2
-rw-r--r--units/systemd-timesyncd.service.in1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 33c04df933..21843363d2 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -976,6 +976,8 @@ static int manager_new(Manager **ret) {
if (r < 0)
return r;
+ sd_event_set_watchdog(m->event, true);
+
sd_event_add_signal(m->event, &m->sigterm, SIGTERM, NULL, NULL);
sd_event_add_signal(m->event, &m->sigint, SIGINT, NULL, NULL);
diff --git a/units/systemd-timesyncd.service.in b/units/systemd-timesyncd.service.in
index 158438e627..1d1f4860a8 100644
--- a/units/systemd-timesyncd.service.in
+++ b/units/systemd-timesyncd.service.in
@@ -19,6 +19,7 @@ ExecStart=@rootlibexecdir@/systemd-timesyncd
CapabilityBoundingSet=CAP_SYS_TIME CAP_SETUID CAP_SETGID CAP_SETPCAP
PrivateTmp=yes
PrivateDevices=yes
+WatchdogSec=1min
[Install]
WantedBy=multi-user.target