smf

This wraps any binary in Solaris SMF and starts the service

Philip Brown

ppbrown

8,798 downloads

8,663 latest version

1.6 quality score

Version information

  • 1.0.1 (latest)
  • 1.0.0
released Jun 17th 2014

Start using this module

Tags: solaris, smf

Documentation

ppbrown/smf — version 1.0.1 Jun 17th 2014

smf::service is a convenience class to turn a "normal" (aka legacy) boot time service or demon, into an SMF run one.

The first time the class is run, puppet should install the SMF service definition, and ideally, enable the service.

Any subsequent time, it should just make sure the service is enabled.

DISCLAIMER: This does not install or configure any demon. It presumes whatever binaries you need to run, are already fully configured and installed. This class merely creates an SMF layer around it.

USAGE:

smf::service { "yourservice": service_command => "/usr/sbin/somename -optional args"}

REQUIREMENTS:

For any instance, you must provide define:

  1. the service name (which is the 'name' of the resource)
  2. full path to the binary, 'servicecommand' (unless you are providing your own start script with hardcoded path, in which case, you can just fake it) #(optional) the source path for the config file #(optional) whether the demon supports refresh via HUP signal

I toyed with the idea of making optional arguments for things like

#(optional) the source path for the init script style start/stop script #(optional) the source path for the SMF definitions However, I think that would be better done, by creating a whole new class or subclass. ie: smf::yourservice

It would be a little more efficient also, since that way, you could use hardcoded files, rather than templated ones.

AUTHOR

  • Philip Brown