mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
Add service/task name config option
Allows the service/task name derived from the binary to be
overridden with a custom name.
Example:
service name:dhcpd [2] /usr/sbin/udhcpd -f -- DHCP Server
Signed-off-by: Robert Andersson <robert.m.andersson@se.atlascopco.com>
This commit is contained in:
+1
-8
@@ -459,14 +459,7 @@ static int show_status(char *arg)
|
||||
|
||||
if (!verbose) {
|
||||
int adj = screen_cols - 60;
|
||||
char *name = strrchr(svc->cmd, '/');
|
||||
|
||||
if (!name)
|
||||
name = svc->cmd;
|
||||
else
|
||||
name++;
|
||||
|
||||
printf("%-16.16s %-*.*s\n", name, adj, adj, svc->desc);
|
||||
printf("%-16.16s %-*.*s\n", svc->name, adj, adj, svc->desc);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user