Quoth Christine Tran on Tue, Jan 06, 2009 at 02:28:00PM -0500:
> Oye, simplicity. The script is checking something for the main apps;
> it needs to run all the time, thus, it must be not-transient because I
> would like SMF to restart it if it dies for whatever reason; stupid
> admin, sudden suicidal tendencies in lonely scripts.  But, there are
> valid exit conditions.  In these cases I would like to set the exit
> code so that the service goes to maintenance, and despite that it's a
> regular "all processes have exited", SMF should not attemp to restart.
>  Is this possible?  I can make a wrapper shell kick the process off,
> it does not need to trap anything from the child, I don't think.

It is not.  That is more sophisticated monitoring behavior than SMF
currently provides for.  You should be able to call "svcadm mark
maintenance" before exiting, though some would say that that's an
administrative command, so it may get you into trouble in the future.


David

Reply via email to