If you're not familiar with the Service Management Facility (SMF) in Solaris and SmartOS (aka Smartmachine), then the man page necessarily the best way to learn it. Here are some helpful hints for using SMF's
Creating the SMF Manifest
Create the service manifest xml file:
$ svccfg import myservice.xml
Updating an SMF Manifest
If you already have a service manifest xml file, you can make changes to it and re-import it.
$ svccfg import manifest.xml
- Don't forget to restart your service.
$ svcadm restart service-name
Use the interactive
List child entities, if nothing is selected yet, this is the list of services:
Select a service:
svc:> select site/myservice
Lists all of the properties of the selected service:
List a specific property:
svc:/site/myservice> listprop start/exec
vim, with a several commented out svc commands. Uncomment a setprop line, change the value, save, and quit:
Set a specific property:
svc:/site/myservice> setprop start/exec = astring: "myservice --arg1 --arg2"
After you make your changes, restart or refresh your service:
$ svcadm restart myservice