<!--Arbortext, Inc., 1988-2007, v.4002-->
<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD SolBook 3.5//EN" [
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "common.ent">
%commonents;
]>
<!--Arbortext, Inc., 1988-2007, v.4002-->
<?Pub EntList bull rArr sect>
<refentry id="create-service-1">
<!-- @(#)create-service.1 1.12 07/07/25 SMI; -->
<refmeta><refentrytitle>create-service</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">24 July 2007</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&software;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2007, Sun Microsystems, Inc.
All Rights Reserved</refmiscinfo>
</refmeta>
<refnamediv><indexterm><primary>create-service</primary></indexterm><indexterm>
<primary>configures the starting of a DAS or node agent on an unattended boot</primary>
</indexterm>
<refname>create-service</refname><refpurpose> configures the starting of a
DAS or node agent on an unattended boot.</refpurpose></refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>create-service</command>  <option role="double-dash">passwordfile
</option> <replaceable>passwordfile</replaceable>
 [<option role="double-dash">echo</option>={<literal>true | false</literal>}][<option
role="double-dash">terse</option>={<literal>true | false</literal>}][<option
role="double-dash">name</option> <replaceable>servicename</replaceable>] [<option
role="double-dash">type</option> <replaceable>das | nodeagent</replaceable>]
 [<option role="double-dash">serviceproperties</option> <replaceable>serviceproperties
</replaceable>]
 <replaceable>domain-or-node-agent-configuration-directory</replaceable></synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></title>
<para>Configures the starting of a DAS or node agent on an unattended boot.
 On Solaris 10, this command uses the Service Management Facility (SMF). This
is a local command. This command must be run as the OS-level user with superuser
privileges. For AS 9.0, this is available only for Solaris 10. This command
creates the service and the user has to start, enable, disable, delete, or
stop the service. The DAS/node-agent configuration must be stored on a folder
to which the super-user has access. The configuration cannot be stored on
a network file system. This command creates the service such that it is controlled
by the OS-level user, who owns the folder where the configuration of the DAS
or node agent resides. </para>
<para>To run this command, you must have <literal>solaris.smf.*</literal> authorization.
See the <command>useradd</command> and <command>usermod</command> manpages
to find out how to set the authorizations. It is also essential for the users
to have write permission in the directory tree: <literal>/var/svc/manifest/application/SUNWappserver
</literal>. Usually, the super-user has both these permissions. If one wishes
to run these commands as non-root user, then the system administrator must
be contacted so that the relevant authorizations are granted.  </para>
<para>You need to also ensure that:</para>
<itemizedlist>
<listitem><para>Solaris 10 administration commands such as <command>svccfg,
svcs</command>, and <command>auths</command> are available in the PATH, so
that these commands can be executed. A simple test to do so is to issue the
command, <command>which svccfg</command> on a bash shell.</para></listitem>
<listitem><para>You should have write permission for the path, <literal>/var/svc/manifest/application
</literal>.</para></listitem>
</itemizedlist>
</refsect1>
<refsect1 role="options"><title></title>
<variablelist termlength="medium">
<varlistentry><term><option role="double-dash">passwordfile</option></term>
<listitem><para>The <option role="double-dash">passwordfile</option> option
specifies the name of a file containing the password entries in a specified
format. The entry for the password  must have the AS_ADMIN_ prefix followed
by the password name in capital letters. For example, to specify the domain
administration server password, use an entry with the following format: <command>
AS_ADMIN_PASSWORD</command>=<replaceable>password</replaceable>, where <replaceable>
password</replaceable> is the actual administrator password. Other passwords
that can be specified include AS_ADMIN_MAPPEDPASSWORD, AS_ADMIN_USERPASSWORD,
AS_ADMIN_MQPASSWORD, and so on.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>e</option> <option role="double-dash">echo</option></term>
<listitem><para>Setting to true will echo the command line statement on the
standard output. Default is false.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>t</option> <option role="double-dash">terse</option></term>
<listitem><para>Indicates that any output data must be very concise, typically
avoiding human-friendly sentences and favoring well-formatted data for consumption
by a script. Default is false.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">name</option> </term>
<listitem><para> Indicates the name of the service and overrides the default,
if present. </para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">type</option> </term>
<listitem><para> Specifies whether the service pertains to DAS or node agent.
Valid values are<literal> das</literal> and <literal>node-agent</literal> and
the default value is <literal>das</literal>, indicating that the user's domain
will be created as a service by default.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">serviceproperties</option> </term>
<listitem><para> Specifies a colon(:)-separated list of various properties
that are specific to the service. For Solaris 10, if you specify <literal>net_privaddr
</literal>, the service's processes will be able to bind to the privileged
ports (&lt;1024) on the platform. You can bind to ports&lt; 1024 only if the
owner of the service is super-user, this is not allowed. If you specify <literal>
startinstances=true/false</literal>, when the type is node-agent, all the
instances are started when the node-agent starts up.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="operands"><title></title>
<variablelist termlength="medium">
<varlistentry><term><replaceable>domain-dir or node-agent-dir</replaceable></term>
<listitem><para> The absolute path of directory on disk that contains the
configuration of the domain or node agent. </para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="exit-status"><title></title>
<variablelist termlength="medium">
<varlistentry><term>0</term>
<listitem><para>command executed successfully</para>
</listitem>
</varlistentry>
<varlistentry><term>1</term>
<listitem><para>error in executing the command</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>
<?Pub *0000007008 0>
