]> git.ipfire.org Git - telemetry.git/commitdiff
daemon: Enable the watchdog
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Sep 2025 12:13:20 +0000 (12:13 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Sep 2025 12:13:20 +0000 (12:13 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/daemon.c

index 15a2c8dcaa7e48300a2013a628834bd7a1c84bd3..21d7a70453bd99b99f56e2818d3a89021f84358c 100644 (file)
@@ -44,6 +44,13 @@ static int collecty_daemon_setup_loop(collecty_daemon* self) {
        if (r < 0)
                return r;
 
+       // Enable the watchdog
+       r = sd_event_set_watchdog(self->loop, 1);
+       if (r < 0) {
+               ERROR(self->ctx, "Failed to activate watchdog: %s\n", strerror(-r));
+               return r;
+       }
+
        return 0;
 }