Open cnt0 opened 2 months ago
Nitpick: if you run s6-svscan
on $2
, then $2
shouldn't be named a service directory, but a scan directory (which contains [links to] service directories), which is where you host a full supervision tree. A service directory is one that is managed by s6-supervise
and contains the information for one service only.
Apart from that, I don't know the details of the turnstile API so I can't tell, but it looks okay.
As with anything involving user services, however, note that there's a question with logging: here, whatever user services write to their stdout and stderr will fall through to s6-svscan's stdout/stderr, i.e. whatever turnstile runs the script with. If these streams end up in a generic root log, be aware that a user can flood these logs, which is probably not a good idea.
s6 homepage: https://skarnet.org/software/s6/
I've been using this backend for about a week and can confirm that it works
@skarnet might want to review that as well