Note:

To use the sm_service utility to install a service or start a service, you must have administrative privileges on the local host.

The syntax for the sm_service install command for a notification adapter is:

tBASEDIR/smarts/bin/sm_service install --force 
--name=<service_name> --startmode=<mode>
--description="<DESC>"
BASEDIR/smarts/bin/sm_notify --output[=<file>] [<param> ...] <notifier> s

The parameters for the sm_service install command are described in sm_service install parameters and descriptions.

The sm_service install command uses the same sm_notify parameters as previously described in GUID-9090D1CB-5D49-4EFA-BCBC-497202059CDB.html#GUID-9090D1CB-5D49-4EFA-BCBC-497202059CDB___NOTIFICATION_ADAPT_CHAPTER_2_RUNNING_27825. The exception is the --daemon parameter which is not applicable for the sm_service utility.

Table 1. sm_service install parameters and descriptions

Parameter

Description

--force

Overwrites an existing service with the same name. This parameter is used to update or modify the parameters of an existing service.

--name=<service_name>

Display name of the service.

--startmode=<mode>

Service start policy. The value for <mode> is one of the following:

  • Runonce (start automatically when sm_serviced starts)

  • Automatic (starts automatically when sm_serviced does not detect that it is running)

  • Manual (requires an explicit start request)

  • Disable (cannot be started)

The default is runonce.

--description="<DESC>"

Short description of the service. Enclose the description with double quotation marks.

On UNIX platforms, the description information is printed with the name of the service when the sm_service show action is invoked.

--env=<NAME>=<VALUE>

Specifies environment variables. This parameter is required for the VMware Smarts Adapter for TIBCO Rendezvous. “Setting environment variables” on page 7-5 contains additional information on specifying TIBCO libraries.

A <NAME>=<VALUE> pair that will be placed in the process environment of the launched service. As many --env pairs as necessary can be specified.

The syntax <NAME>= (with no specified value) has the effect of unsetting <NAME> in the environment of the launched program.

The --env arguments are applied left to right as they appear on the command line, and this ordering is preserved in the database.