mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00:00
initctl: dump svc type and forking in JSON output
First set of svc_t properties not possible to debug otherwise. See issue #313 for a background. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
2f91ab5eac
commit
035f06e137
1 file changed
+4
@@ -943,10 +943,14 @@ static int json_status_one(FILE *fp, svc_t *svc, char *indent, int prev)
|
|||||||
"%s{\n"
|
"%s{\n"
|
||||||
"%s \"identity\": \"%s\",\n"
|
"%s \"identity\": \"%s\",\n"
|
||||||
"%s \"description\": \"%s\",\n"
|
"%s \"description\": \"%s\",\n"
|
||||||
|
"%s \"type\": \"%s\",\n"
|
||||||
|
"%s \"forking\": %s,\n"
|
||||||
"%s \"status\": \"%s\",\n",
|
"%s \"status\": \"%s\",\n",
|
||||||
prev ? ",\n" : indent, prev ? indent : "",
|
prev ? ",\n" : indent, prev ? indent : "",
|
||||||
indent, svc_ident(svc, NULL, 0),
|
indent, svc_ident(svc, NULL, 0),
|
||||||
indent, svc->desc,
|
indent, svc->desc,
|
||||||
|
indent, svc_typestr(svc),
|
||||||
|
indent, svc->forking ? "true" : "false",
|
||||||
indent, svc_status(svc));
|
indent, svc_status(svc));
|
||||||
if (svc->state != SVC_RUNNING_STATE) {
|
if (svc->state != SVC_RUNNING_STATE) {
|
||||||
int rc, sig;
|
int rc, sig;
|
||||||
|
|||||||
Reference in new issue
Block a user