Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initctl status <name> should show all corresponding :id services not just the first one #275

Closed
hongkongkiwi opened this issue May 19, 2022 · 3 comments
Milestone

Comments

@hongkongkiwi
Copy link
Contributor

hongkongkiwi commented May 19, 2022

In my service setup, I have one name with multiple id's.

I'm missing a way to check the status of all services under a particular name.

I think it would make be helpful and logical if initctl status <name> shows not just one service status, but all of the status's relating to that name.

So if I was to write in bash it would be:

for ID in $(initctl ident $MYNAME); do
  initctl status "$ID"
done

Specific status can still be checked with initctl status <name>:<id> ofcourse, so hopefully it wouldn't be breaking anything.

I guess at the moment initctl status <name> just shows the first service defined in the config file which just depends on the order it's read.

What do you think?

@hongkongkiwi
Copy link
Contributor Author

hongkongkiwi commented May 19, 2022

Or here's another idea this might be tidier, perhaps initctl status <name> could just show the same as initctl status but only specifically based on the name. Then if you want to drill down you can do initctl status <name>:<id> as now.

I would imagine that initctl -q status <name> would show as 0 only if all ids have success, otherwise 1, this is related to #273

@troglobit
Copy link
Owner

Yeah, I like the latter suggestion, that's pretty much what I'd too expect from a system 👍

@troglobit troglobit added this to the 4.4 milestone May 19, 2022
@troglobit
Copy link
Owner

troglobit commented Jun 19, 2022

Interesting, turns out we had something similar to this which was changed in e51587c. I'll make sure to honor that change by splitting on :. Original implementation was in #197 ... kinda similar to this one :-/

A test will be added to protect against future regressions.

troglobit added a commit that referenced this issue Jun 19, 2022
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants