Changeset 28648 for trunk/doc


Ignore:
Timestamp:
Sep 6, 2007, 5:40:21 AM (13 years ago)
Author:
markd@…
Message:

Startupitems section corrections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/guide/new/xml/portfileref.xml

    r28640 r28648  
    240240
    241241    <para>There are three categories of StartupItem keywords. Those that
    242     trigger StartupItem creation and attributes, those that specify attributes
    243     of <quote>executable</quote> StartupItems, and those that specify
    244     attributes of <quote>script</quote> StartupItems.</para>
     242    trigger StartupItem creation and setup logging, those that specify
     243    attributes of <quote>executable</quote> StartupItems, and those that
     244    specify attributes of <quote>script</quote> StartupItems.</para>
    245245
    246246    <section id="reference.startupitems.creation">
    247       <title>StartupItem Creation &amp; Attributes</title>
     247      <title>StartupItem Creation &amp; Logging</title>
    248248
    249249      <para>The keywords in this section may be used with either
     
    289289
    290290            <programlisting>startupitem.name  OpenSSH</programlisting>
    291           </listitem>
    292         </varlistentry>
    293 
    294         <varlistentry>
    295           <term>startupitem.pidfile</term>
    296 
    297           <listitem>
    298             <para>This keyword must be defined properly for
    299             <command>daemondo</command> to be able to monitor a daemon and
    300             restart it if it dies. This is true for both <quote>script</quote>
    301             and <quote>executable</quote> StartupItems. It specifies two
    302             things; a process id (PID) file handling type, and a pidfile name
    303             and path.</para>
    304 
    305             <simplelist>
    306               <member>Type: optional</member>
    307 
    308               <member>Default: <option>[none]</option> |
    309               <filename>[${prefix}/var/run/${name}.pid]</filename></member>
    310 
    311               <member>Values: <option>[none auto manual clean]</option>
    312               [<replaceable>/path/to/pidfile</replaceable>]</member>
    313 
    314               <member>Example:</member>
    315             </simplelist>
    316 
    317             <programlisting>startupitem.pidfile auto ${prefix}/var/run/${name}.pidfile</programlisting>
    318 
    319             <para>Pidfile handling options:</para>
    320 
    321             <simplelist>
    322               <member><option>none</option> - The daemon is not to use a
    323               pidfile.</member>
    324 
    325               <member><option>auto</option> - The daemon generates its own
    326               pidfile.</member>
    327 
    328               <member><option>manual</option> - The daemon never generates a
    329               pidfile; the StartupItem must manage the pidfile on its
    330               own.</member>
    331 
    332               <member><option>clean</option> - The daemon generates its own
    333               but will not delete it; the StartupItem must delete it.</member>
    334             </simplelist>
    335291          </listitem>
    336292        </varlistentry>
     
    388344      <para><quote>Executable</quote> StartupItems are slightly preferred over
    389345      <quote>script</quote> StartupItems because <command>daemondo</command>
    390       may be better able to detect when a daemon has died when it launches it
    391       directly, rather than indirectly via a startup script, though for
    392       daemondo to monitor either type, the <code>startupitem.pidfile</code>
    393       keyword must be set (see above). The <quote>executable</quote>
    394       StartupItem specifies the path and name of the daemon to be run in the
     346      launches the daemon directly, rather than indirectly via a startup
     347      script, and therefore it automatically knows how to monitor the daemon
     348      to restart it if it dies. The <quote>executable</quote> StartupItem
     349      specifies the path and name of the daemon to be run in the
    395350      background.</para>
    396351
     
    431386      <title>Script StartupItems</title>
    432387
    433       <para>StartupItems of type <quote>script</quote> let
    434       <command>daemondo</command> launch daemons via startup scripts. When
    435       using this type of StartupItem, the <code>startupitem.pidfile</code>
    436       keyword should be used so <command>daemondo</command> can monitor the
    437       daemon's PID and restart it if it dies.</para>
     388      <para>StartupItems of type <quote>script</quote> use
     389      <command>daemondo</command> to launch a daemon via a startup script
     390      provided in port distributions containing daemons. When using this type
     391      of StartupItem, the <code>startupitem.pidfile</code> keyword may be used
     392      so <command>daemondo</command> can monitor the daemon's PID and restart
     393      it if it dies.</para>
    438394
    439395      <note>
     
    445401      <variablelist>
    446402        <varlistentry>
     403          <term>startupitem.start</term>
     404
     405          <listitem>
     406            <para>Specify a shell script to start the daemon.</para>
     407
     408            <simplelist>
     409              <member>Type: optional</member>
     410
     411              <member>Default: none</member>
     412
     413              <member>Values: <literal>shell_script</literal></member>
     414
     415              <member>Example:</member>
     416            </simplelist>
     417
     418            <programlisting>startupitem.start ${prefix}/share/mysql/mysql.server start</programlisting>
     419          </listitem>
     420        </varlistentry>
     421
     422        <varlistentry>
     423          <term>startupitem.stop</term>
     424
     425          <listitem>
     426            <para>Specify a shell script to stop the daemon.</para>
     427
     428            <simplelist>
     429              <member>Type: optional</member>
     430
     431              <member>Default: none</member>
     432
     433              <member>Values: <literal>shell_script</literal></member>
     434
     435              <member>Example:</member>
     436            </simplelist>
     437
     438            <programlisting>startupitem.start ${prefix}/share/mysql/mysql.server stop</programlisting>
     439          </listitem>
     440        </varlistentry>
     441
     442        <varlistentry>
     443          <term>startupitem.restart</term>
     444
     445          <listitem>
     446            <para>Specify a shell script to restart the daemon. In the absence
     447            of this key, the daemon will be restarted by taking the stop
     448            action, followed by taking the start action.</para>
     449
     450            <simplelist>
     451              <member>Type: optional</member>
     452
     453              <member>Default: none</member>
     454
     455              <member>Values: <literal>shell_script</literal></member>
     456
     457              <member>Example:</member>
     458            </simplelist>
     459
     460            <programlisting>startupitem.start  ${prefix}/share/mysql/mysql.server restart</programlisting>
     461          </listitem>
     462        </varlistentry>
     463
     464        <varlistentry>
     465          <term>startupitem.pidfile</term>
     466
     467          <listitem>
     468            <para>This keyword must be defined properly for
     469            <command>daemondo</command> to be able to monitor daemons launched
     470            via <quote>script</quote> StartupItems and restart them if they
     471            die. It specifies two things: a process id (PID) file handling
     472            method, and a pidfile name and path.</para>
     473
     474            <simplelist>
     475              <member>Type: optional</member>
     476
     477              <member>Default: <option>[none]</option> |
     478              <filename>[${prefix}/var/run/${name}.pid]</filename></member>
     479
     480              <member>Values: <option>[none auto manual clean]</option>
     481              [<replaceable>/path/to/pidfile</replaceable>]</member>
     482
     483              <member>Example:</member>
     484            </simplelist>
     485
     486            <programlisting>startupitem.pidfile auto ${prefix}/var/run/${name}.pidfile</programlisting>
     487
     488            <para>Pidfile handling options:</para>
     489
     490            <simplelist>
     491              <member><option>none</option> - The daemon is not to use a
     492              pidfile.</member>
     493
     494              <member><option>auto</option> - The daemon generates its own
     495              pidfile.</member>
     496
     497              <member><option>manual</option> - The daemon never generates a
     498              pidfile; the StartupItem must manage the pidfile on its
     499              own.</member>
     500
     501              <member><option>clean</option> - The daemon generates its own
     502              but will not delete it; the StartupItem must delete it.</member>
     503            </simplelist>
     504          </listitem>
     505        </varlistentry>
     506
     507        <varlistentry>
    447508          <term>startupitem.init</term>
    448509
     
    463524
    464525            <programlisting>startupitem.init  "PID=/var/run/dhcpd.pid"</programlisting>
    465           </listitem>
    466         </varlistentry>
    467 
    468         <varlistentry>
    469           <term>startupitem.start</term>
    470 
    471           <listitem>
    472             <para>Specify a shell script to start the daemon.</para>
    473 
    474             <simplelist>
    475               <member>Type: optional</member>
    476 
    477               <member>Default: none</member>
    478 
    479               <member>Values: <literal>shell_script</literal></member>
    480 
    481               <member>Example:</member>
    482             </simplelist>
    483 
    484             <programlisting>startupitem.start ${prefix}/share/mysql/mysql.server start</programlisting>
    485           </listitem>
    486         </varlistentry>
    487 
    488         <varlistentry>
    489           <term>startupitem.stop</term>
    490 
    491           <listitem>
    492             <para>Specify a shell script to stop the daemon.</para>
    493 
    494             <simplelist>
    495               <member>Type: optional</member>
    496 
    497               <member>Default: none</member>
    498 
    499               <member>Values: <literal>shell_script</literal></member>
    500 
    501               <member>Example:</member>
    502             </simplelist>
    503 
    504             <programlisting>startupitem.start ${prefix}/share/mysql/mysql.server stop</programlisting>
    505           </listitem>
    506         </varlistentry>
    507 
    508         <varlistentry>
    509           <term>startupitem.restart</term>
    510 
    511           <listitem>
    512             <para>Specify a shell script to restart the daemon. In the absence
    513             of this key, the daemon will be restarted by taking the stop
    514             action, followed by taking the start action.</para>
    515 
    516             <simplelist>
    517               <member>Type: optional</member>
    518 
    519               <member>Default: none</member>
    520 
    521               <member>Values: <literal>shell_script</literal></member>
    522 
    523               <member>Example:</member>
    524             </simplelist>
    525 
    526             <programlisting>startupitem.start  ${prefix}/share/mysql/mysql.server restart</programlisting>
    527526          </listitem>
    528527        </varlistentry>
Note: See TracChangeset for help on using the changeset viewer.