I've created a service for an application, and I want this application to be started on boot. In the service manifest, I realize that there's a property for this (enabled="true"), but I've been avoiding this for a particularly annoying aspect:
The import is part of a script. Having the service as "enabled" means that it will be restarted on import. The problem is that I'm not sure how to wait until the process is enabled before continuing. So, what I do in the script is import with enabled set as "false", then run "svcadm enable -s
So I was wondering if anyone had any answers for any one of these questions:
- How do you make an existing service start on boot (hopefully avoiding manual additions to rc3.d)?
- How do you make svccfg import wait until a service is completely enabled before continuing?
- Is there an elegant way to wait until a service is started before continuing (avoiding manually grepping for enabled in a loop)?