Add support for finit <stop|start|reload|restart> JOB

This patch further extends the capabilities of the client with the
ability to control the running state of services:

    finit <stop|start|reload|restart> JOB

Since services can now exist with multiple instances the concept of
"jobs" is introduced in this patch.  A job is a numeric identifier of
the form `NUM[:NUM]`, the latter `:NUM` is the new instance syntax
introduced earlier.  See the output of `finit status` for the JOB id.

Also, with the introduction of multiple instances we broke support for
multiple related inetd services.  This became obvious when the shiny new
`finit status` was tested ... hence, this patch also contains fixes to
the inetd support.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-06-08 08:32:49 +02:00
1 parent 720324b256
commit 24e1d284ad
7 files changed
+296 -93

No files matched your search

+1
View File
@@ -34,6 +34,7 @@ svc_cmd_t service_enabled (svc_t *svc, int event, void *arg);
int service_start (svc_t *svc);
int service_stop (svc_t *svc);
int service_restart (svc_t *svc);
int service_reload (svc_t *svc);
void service_reload_dynamic (void);