* exceline & supervision
@ 2006-01-11 10:10 Frans Haarman
2006-01-11 15:39 ` Laurent Bercot
0 siblings, 1 reply; 2+ messages in thread
From: Frans Haarman @ 2006-01-11 10:10 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 726 bytes --]
Hi,
I am using exceline to build run scripts for my services. It works
great, the only problem
is other people dont understand it ;)
I am concidering a 'standard' run script.
#!/command/excelineb
fdmove -c 2 1
foreground { ./bin/precmd }
foreground { ./bin/runcmd }
foreground { ./bin/postcmd }
echo 'service has ended'
In my understanding this will allow others to use shell scripts, but it
wont leave a shell hanging
around.
Can anyone see problems with this setup ?
Regards,
Frans
Frans Haarman
De Giessen Automatisering B.V.
Technische Dienst
Tel: (0184) 67 53 75
Fax: (0184) 61 12 46
E-mail: helpdesk@giessen.nl
Internet: www.giessen.nl
Algemeen
Tel: (0184) 67 54 00
D u i d e l i j k e t a a l !
[-- Attachment #2: Type: text/html, Size: 4392 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: exceline & supervision
2006-01-11 10:10 exceline & supervision Frans Haarman
@ 2006-01-11 15:39 ` Laurent Bercot
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Bercot @ 2006-01-11 15:39 UTC (permalink / raw)
> #!/command/excelineb
In a run script, you could use:
#!/command/execlineb -P
Your environment will be cleaner.
> foreground { ./bin/runcmd }
> Can anyone see problems with this setup ?
You won't have any execline-specific problems.
But instead of having a /bin/sh hanging around, you'll have a
/command/foreground hanging around.
... supervise foo
\_ foreground
\_ foo
instead of
... supervise foo
\_ foo
This means that you won't be able to use svc to send signals to your
service.
It's better to forget post-cmd entirely, and have your run script exec
into your service. If you really need a post-cmd, switch from daemontools
to runit, and use runsv's "finish script" feature.
--
Laurent
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-11 15:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-11 10:10 exceline & supervision Frans Haarman
2006-01-11 15:39 ` Laurent Bercot
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).