ready:script and running:script options? #298
Replies: 2 comments 3 replies
-
A ready:script would be really useful I think. For the mdevd case it's a great fit. My initial idea was to add a In summary, we need the new (optional) notification subsystem to integrate better with s6-style daemons like mdevd. But already now we can add ready:script that would trigger on classic daemons that create their .pid-file when they are done. The new notification subsystem could then just hook into that same mechanism to trigger the same internal state changes for the service monitor. ¹ much of Finit is built around the condition subsystem, so it would be neat to be able to extend on that. |
Beta Was this translation helpful? Give feedback.
-
I think there's one usecase I'm missing at the moment, which is being able to retrigger tasks marked as done when the condition changes again. If I want to have a script perform an action when a service runs it will work only the first time, but once the service quits and reruns the task won't trigger again because it is already marked as done. Is it possible to have something like alwaysrun:true so that a task ignores the fact that it has been run successfully ? This is loosely related to this topic ;) but it made me realise that I'm limited at the moment in some things I want to trigger off these notifications. |
Beta Was this translation helpful? Give feedback.
-
I would like to run a script when the service is started and stopped
Tasks and conditions are perfect for this, however the task only runs once and once it's run successfully it doesn't run again. So it's not ideal for notifications which need to run multiple times.
Do you think it makes sense to have a ready:script (could be paired with the S6 readyness notification) or running:script option? We already have a pre and post option, perhaps these two could be nice compliments?
Beta Was this translation helpful? Give feedback.
All reactions