On 6/29/07, Stephen Hahn <sch at sun.com> wrote: > Can you keep stunnel in the foreground? If so, you might be able to > do something like > > "stunnel ARGS || exit $SMF_EXIT_ERR_FATAL" > > as the start method. > > If not, you'll need to write a little method in shell that runs > stunnel, and then does a wait, and then exits with a status with > precise meaning to smf(5).
If I understand this correctly, the method will cause the service to never reach an online state and smf(5) will timeout the start script. > In summary: if you can have your service fail with one of the > SMF_EXIT_ERR_* values, then svc.startd(1M) won't attempt to restart > it. An idea is to have a start method that starts stunnel normally when invoked for the first time after boot up and fail on subsequent invocations. smf(5) will invoke start again when stunnel dies and it will get an error. -- Just me, Wire ... Blog: <prstat.blogspot.com>