From 1fd4e60e9d03c0e3aa79f5f0bac87f07c63081f5 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 4 Jun 2014 20:50:00 +0100 Subject: send ubus_notify events when servers and instances change state Signed-off-by: John Crispin --- service/instance.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'service/instance.c') diff --git a/service/instance.c b/service/instance.c index fa3594b..e410bc4 100644 --- a/service/instance.c +++ b/service/instance.c @@ -188,6 +188,7 @@ instance_start(struct service_instance *in) in->proc.pid = pid; clock_gettime(CLOCK_MONOTONIC, &in->start); uloop_process_add(&in->proc); + service_event("instance.start", in->srv->name, in->name); } static void @@ -236,6 +237,7 @@ instance_exit(struct uloop_process *p, int ret) uloop_timeout_set(&in->timeout, in->respawn_timeout * 1000); } } + service_event("instance.stop", in->srv->name, in->name); } void -- cgit v1.2.3