mirror of
https://github.com/troglobit/finit.git
synced 2026-10-15 10:29:35 +00:00
initctl: add cond, user, group and visual hints for status command
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
93402b81d7
commit
3b19db04e3
1 file changed
+4
-1
+4
-1
@@ -557,15 +557,18 @@ static int show_status(char *arg)
|
||||
if (!svc)
|
||||
return 1;
|
||||
|
||||
printf("Status : %s%s%s\n", !plain ? "\e[1m" : "", svc_status(svc), !plain ? "\e[0m" : "");
|
||||
printf("Identity : %s\n", svc_ident(svc, ident, sizeof(ident)));
|
||||
printf("Description : %s\n", svc->desc);
|
||||
printf("Origin : %s\n", svc->file[0] ? svc->file : "built-in");
|
||||
printf("Environment : %s\n", svc->env);
|
||||
printf("Condition(s): %s\n", svc->cond);
|
||||
printf("Command : %s\n", svc_command(svc, cmd, sizeof(cmd)));
|
||||
printf("PID : %d\n", svc->pid);
|
||||
printf("User : %s\n", svc->username);
|
||||
printf("Group : %s\n", svc->group);
|
||||
printf("Uptime : %s\n", svc->pid ? uptime(now - svc->start_time, buf, sizeof(buf)) : buf);
|
||||
printf("Runlevels : %s\n", runlevel_string(runlevel, svc->runlevels));
|
||||
printf("Status : %s\n", svc_status(svc));
|
||||
printf("\n");
|
||||
|
||||
return do_log(svc->cmd);
|
||||
|
||||
Reference in new issue
Block a user