Closed pwFoo closed 4 years ago
I don't really like this, because of the ambiguity it introduces. Socket units are named the same as their service units, so it's not clear which one the user wanted to start.
I would consider starting a unit if only one unit has that name as a prefix, and else return an error with the names of the matching units. Is that acceptable to you?
Would be ok. User needs maybe a hint why it fails / not found 👍
With 5f96b0b599f67f0d1bc7621d8a2ee80925c3fb8a this should work. As long as there is only one unit matching the name you give to restart and friends it should work as expected.
Moreover, you only need to enter a identifying prefix of the name.
Assume you have the services sshd and sssd, you can run rsdctl restart ssh
and sshd.service will be selected :)
Works fine!
I added a rust package manager to my fun linux os and have problems to reload (add) and start a new unitfile.
New unitfile is addes sucessful
(Re-)start without.service fails
Works fine with ".service" added