KB Article #168807

startinstance.bat not working with options -s and -k

Problem

-- startinstance.bat not working with options -s and -k

Resolution

* indeed -s and -k options are:

1-not well documented

2-behaving differently on UNIX and Windows

* below the missing part of documentation to be fixed in a future release:

 

On UNIX platforms:

The "-d", "-s" and "-k" options for UNIX are designed for use with the
service controller - i.e., traditional SVr4 init, systemd, upstart,
etc.

The "-d" option waits until the service is up and running before
returning, and "-k" waits for the process to terminate - this means
that when used in a script, the completion of the command is an
indication that the operation requested has completed.

"-s" will exit with a "0" status code if the service is running, and 1
otherwise, eg, you can use
startinstance -s -n InstanceName -g GroupName && echo Running
to print a message if the service is running.

For windows:

The service control manager requires more intimate interaction with
the process - the product will run as a service, but needs to be
started by the service control manager to do so

The -d and -k options may be used internally as part of the service
control manager interaction, but they are not for interactive
consumption (They are used to differentiate between a command-line
startup and a startup from the SCM). "-s" is not implemented. When
installed as a service, you can control and query the API Server via
the service control manager (through the applet, the "net", or "sc"
commands, for example)