setuid, pre-start and stop

Stuart Knightley stuart at stuartk.com
Tue Feb 4 06:21:25 UTC 2014


On Saturday, February 1, 2014 at 1:17 PM, Steve Langasek wrote:
> In general, anything you can do in a {pre,post}-{start,stop} script, you can
> also do in a separate job with a 'start on {start,stopp}{ed,ing}' rule. And
> in a case such as this where you are running the main job under some sort of
> access controls, this is what you need to do.
> 
> Something like the following should work:
> 
> start on starting main_job
> script
> if $condition; then
> stop main_job
> fi
> end script
> 
> Hope that helps,
Ah yes, hadn't thought of that approach, that helps a lot! Thanks very much.

Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20140203/85b22c17/attachment.html>


More information about the upstart-devel mailing list