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

Oneshot option for "run" backend command #12

Closed
kodiak77 opened this issue Dec 12, 2023 · 2 comments
Closed

Oneshot option for "run" backend command #12

kodiak77 opened this issue Dec 12, 2023 · 2 comments

Comments

@kodiak77
Copy link

Hi, I have been trying to write turnstile backend for 66 user service manager for Obarun linux. The user service manager in 66 is managed by the rest of the 66 service hierarchy and is not meant to be run from another process like turnstile (though, it is technically possible). Instead, 66-all up is used to start the user service manager and 66-all down to stop it.

I made it work by writing an infinite loop at the end of "run" action, but this doesn't seem to be the most elegant solution. Also, the sleep command which I run in the loop, cannot be interrupted using SIGTERM trivially, which also makes stopping the service manager more difficult.

I am curious if there is any existing or planned way for the "run" action to be a oneshot?

@q66
Copy link
Member

q66 commented Dec 12, 2023

no, this is not supported by design as turnstile is required to be able to supervise the user service manager

@q66 q66 closed this as completed Dec 12, 2023
@Nanderty
Copy link

Nanderty commented Jul 6, 2024

I would kindly request to add support to this: executing a oneshot on first login and another on last logout.
This oneshot should (like the longrun now) be the same script both times and be passed the "run" and "stop" args.
The oneshot would need to be ran as root.
This would allow all users of s6/s6-rc and probably 66 to have their user supervision tree supervised and configured by the system supervision tree. Thus limiting the usage of turnstile only for tracking logins/logouts and nothing more, arguably being more elegant for some configurations and giving the system adminitrator/distribution maintainer more freedom.
Would it be possible to add this functionallity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants