diff options
author | John Crispin <blogic@openwrt.org> | 2014-06-04 21:50:00 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-06-05 12:45:15 +0200 |
commit | 1fd4e60e9d03c0e3aa79f5f0bac87f07c63081f5 (patch) | |
tree | ed6698f6ed6a10e4aa5d4c0f2a04e51a2a056441 /service/instance.c | |
parent | 386dfd4cdb444633861a812c645d56bd5c329c78 (diff) | |
download | unitd-1fd4e60e9d03c0e3aa79f5f0bac87f07c63081f5.tar unitd-1fd4e60e9d03c0e3aa79f5f0bac87f07c63081f5.zip |
send ubus_notify events when servers and instances change state
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'service/instance.c')
-rw-r--r-- | service/instance.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |