Hitachi

Hitachi Application Server V10 Command Reference Guide (For UNIX® Systems)


2.4.4 create-service

Configures the starting of the DAS or server instance on an unattended boot on OS.

Synopsis

asadmin [asadmin-options] create-service [--help]
    [--serviceproperties service-properties] [--dry-run={false|true}]
    [--force={false|true}] [--serviceuser service-user]
    [--domaindir domain-dir] [--nodedir node-dir] [--node node]
    [domain-or-instance-name]

Storage location

Application Server installation directory/javaee/glassfish/bin

Function

The create-service subcommand configures the starting of a Domain Administration Server (DAS) or a server instance on an unattended boot on the OS.

If no operand is specified and the domains directory contains only one domain, the subcommand configures the starting of the DAS for the default domain. If no operand is specified and the domains directory contains multiple domains, an error occurs.

If the operand specifies an instance, the create-service subcommand does not contact the domain administration server (DAS) to determine the node on which the instance resides. To determine the node on which the instance resides, the subcommand searches the directory that contains the node directories. If multiple node directories exist, the node must be specified as an option of the subcommand.

This subcommand is supported in local mode only

Execution permission

Superuser

Files

On UNIX systems, the create-service subcommand creates a System-V-style initialization script /etc/init.d/domain-or-instance-name and installs a link to this script in the /etc/rc?.d directories.

Arguments

--help | -?

Displays the help text for the subcommand.

--serviceproperties service-properties

Specifies a colon(:)-separated list of various properties that are specific to the service.

Type: String

The following values can be specified:

  • Name of the service property

Default value: If you do not specify the DISPLAY_NAME property, then the display name of the service in the list of Windows Services is Name of the instance or domain Hitachi Java EE Server.

--dry-run={false|true} | -n

Previews your attempt to create a service. Indicates issues and the outcome that will occur if you run the command without using the --dry-run option.

Type: Boolean

The following values can be specified:

  • true

  • false

Default value: false

--force={false|true}

Specifies whether the service is created even if validation of the service fails.

Type: Boolean

The following values can be specified:

  • true

    The service is created even if validation of the service fails.

  • false

    The service is not created. This is the default value.

Default value: false

--serviceuser service-user

Specifies the user that is to run Application Server software when the service is started. Specify this option if Application Server software is to be run by a user other than the root user.

Type: String

The following values can be specified:

  • Name of the service user

Default value: The default is the user that is running the subcommand.

--domaindir domain-dir

Specifies the absolute path of the directory on the disk that contains the configuration of the domain. If this option is specified, the operand must specify a domain.

Type: File

The following values can be specified:

  • Absolute path of the directory

Default value: Application Server installation directory/javaee/glassfish/domains

--nodedir node-dir

Specifies the directory that contains the instance's node directory. If this option is specified, the domain-or-instance-name must specify a instance.

Type: String

The following values can be specified:

  • Instance nodes directory

Default value: Application Server installation directory/javaee/glassfish/nodes

--node node

Specifies the node on which the instance resides. This option may be omitted only if the directory specified by the --nodedir option contains only one node directory. Otherwise, this option is required. If this option is specified, the domain-or-instance-name must specify an instance.

Type: String

The following values can be specified:

  • Name of the node

Default value: N/A

domain-or-instance-name

Specifies the name of the domain or instance to configure. If no operand is specified, the default domain is used.

Type: String

The following values can be specified:

  • Name of the domain or instance

Default value: N/A

Examples

The following example creates a service for the default domain.

asadmin create-service

Exit Status

Exit Status

Explanation

0

command executed successfully.

1

error in executing the command.