chiark / gitweb /
service: imply NotifyAccess=main if WatchdogSec= is used
[elogind.git] / src / service.c
index e782421389d9878b02ed009b9581ec1fc4732b7e..ec2725a7badb39c98159d22cbbfe960ba5c48d85 100644 (file)
@@ -1235,6 +1235,9 @@ static int service_load(Unit *u) {
                 if (s->type == SERVICE_NOTIFY && s->notify_access == NOTIFY_NONE)
                         s->notify_access = NOTIFY_MAIN;
 
+                if (s->watchdog_usec > 0 && s->notify_access == NOTIFY_NONE)
+                        s->notify_access = NOTIFY_MAIN;
+
                 if (s->type == SERVICE_DBUS || s->bus_name)
                         if ((r = unit_add_two_dependencies_by_name(u, UNIT_AFTER, UNIT_REQUIRES, SPECIAL_DBUS_SOCKET, NULL, true)) < 0)
                                 return r;