diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-05-17 21:11:00 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-18 20:52:49 +0900 |
commit | 9f7115498bac670013f6b8923f2e12366fbd13a8 (patch) | |
tree | 5380928a5ab6cf0bbdf5b247113f3c139718b1ed | |
parent | a349eb10d3c3a31cd47198cbf08e4f0dfaffef1d (diff) |
timesyncd: enable watchdog support
-rw-r--r-- | src/timesync/timesyncd.c | 2 | ||||
-rw-r--r-- | units/systemd-timesyncd.service.in | 1 |
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 |