From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: supervision@list.skarnet.org
Subject: Re[2]: Have an external script wait for a oneshot service
Date: Thu, 05 Dec 2024 19:44:17 +0000 [thread overview]
Message-ID: <ema78c15a3-12bf-4f58-839a-1240523b1f07@dc4a0aed.com> (raw)
In-Reply-To: <3d1391e4-b240-4675-a839-a34c39d474b3@sopka.ch>
> - 2c A third system-oneshot does:
> - 2ci Prepare the live directory for the user-tree for each user specified in config C (preferably under /run/user/${USER}).
> - 2cii Run "s6-rc-init" and "s6-rc start default" for each user specified in config C.
> (this can be merged with the instantiation system-oneshot if desired.)
Okay. My point is, why do you need that "default" bundle here? Why do
you want an s6-rc infrastructure active when the user isn't logged in?
I can understand a permanent supervision tree per user, but a permanent
service set that includes oneshots feels overengineered to me. What
problem is this supposed to solve?
>- Upon login, a login script L shall invoke an "s6-rc start login" with ("login" being a bundle) for the user logging in.
> (this can be further extended using PAM to run "s6-rc start ${PAM_TYPE}" to differentiate different types of logins)
> The script L can be started by PAM, .profile or in some other way.
My advice is to do your whole 2c point at login time. The script L can
perform XDG stuff, s6-rc-init, and s6-rc start default. On last logout,
you stop everything with "s6-rc -da change" and you delete the livedir.
Only the supervision tree remains, maintaining whatever services the
user has manually added.
I don't think there is a good argument for keeping state (which is
what oneshots do) in user services when the user is logged out. Feel
free to give counterexamples though.
--
Laurent
next prev parent reply other threads:[~2024-12-05 19:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 15:28 Paul Sopka
2024-12-04 15:38 ` Charles Cazabon via supervision
2024-12-04 17:12 ` Paul Sopka
2024-12-04 21:47 ` Hoël Bézier
2024-12-04 20:00 ` Brett Neumeier via supervision
2024-12-04 20:05 ` Paul Sopka
2024-12-04 20:18 ` Brett Neumeier via supervision
2024-12-04 20:59 ` Paul Sopka
2024-12-04 21:58 ` Re[2]: " Laurent Bercot
2024-12-05 5:59 ` Tanuj Bagaria
2024-12-05 6:54 ` Paul Sopka
2024-12-05 8:05 ` Re[2]: " Laurent Bercot
2024-12-05 13:52 ` Paul Sopka
2024-12-05 19:44 ` Laurent Bercot [this message]
2024-12-05 21:10 ` Paul Sopka
2024-12-05 21:42 ` Brett Neumeier via supervision
2024-12-06 5:32 ` Paul Sopka
2024-12-05 23:03 ` Re[2]: " Laurent Bercot
2024-12-06 12:41 ` Paul Sopka
2024-12-06 15:43 ` Re[2]: " Laurent Bercot
2024-12-06 16:11 ` Hoël Bézier
2024-12-06 17:14 ` Paul Sopka
2024-12-07 23:46 ` Jan Braun
2024-12-05 21:24 ` Jan Braun
2024-12-05 23:15 ` Re[2]: " Laurent Bercot
2024-12-04 20:09 ` Tanuj Bagaria
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ema78c15a3-12bf-4f58-839a-1240523b1f07@dc4a0aed.com \
--to=ska-supervision@skarnet.org \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).