<commit_before><?xml version="1.0"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<document>
 <properties>
  <title>Daemon : Procrun</title>
  <author email="<EMAIL>"><NAME></author>
 </properties>

<body>
<section name="Introduction">
<p>
    Procrun is a set of applications that allow Windows users to wrap
    (mostly) Java applications (e.g. Tomcat) as a Windows service.
    <br></br>
    The service can be set to automatically start when the machine boots
    and will continue to run with no user logged onto the machine.
</p>
</section>

<section name="Procrun monitor application">
<p>
    <b>Prunmgr</b> is a GUI application for monitoring and configuring procrun
    services.
</p>
<p>
    Each command line directive is in the form of <b>//XX[//ServiceName]</b>
</p>
<p>
    If the <code>//ServiceName</code> parameter is omitted, then the service name is
    assumed to be the name of the file.
    <br/>
    The Prunsrv application behaves in the same way,
    so to allow both applications to reside in the same directory, the Prunmgr application
    will remove a trailing <b>w</b> (lower-case w) from the name.
    <br/>
    For example if the Prunmgr application is renamed as <code>TestService.exe</code>
    - or as <code>TestServicew.exe</code> -
    then the default service name is <code>TestService</code>.
</p>
    <p>The available command line options are:</p>
<p>
    <table>
    <tr><th>//ES</th>
        <td>Edit service configuration</td>
        <td>This is the default operation. It is called if the no option is
            provided.
            Starts the GUI application which allows the service configuration
            to be modified, started and stopped.
        </td>
    </tr>
    <tr><th>//MS</th>
        <td>Monitor service</td>
        <td>Starts the GUI application and minimizes it to the system tray.
        </td>
    </tr>
    <tr><th>//MR</th>
        <td>Monitor &amp; run service</td>
        <td>Starts the GUI application and minimizes it to the system tray.
            Start the service if it is not currently running.
        </td>
    </tr>
    <tr><th>//MQ</th>
        <td>Monitor Quit</td>
        <td>Stop any running monitor for the service.
        </td>
    </tr>
    </table>
</p>
</section>

<section name="Procrun service application">
<p>
    <b>Prunsrv</b> is a service application for running applications as services.
    It can convert any application (not just Java applications) to run as a service.
</p>

<subsection name="Command line arguments">
<p>
    Each command line directive is in the form of <b>//XX[//ServiceName]</b>.
</p>
<p>
    If the <code>//ServiceName</code> parameter is omitted, then the service name is
    assumed to be the name of the file.
    <br/>
    For example if the application is renamed as <code>TestService.exe</code>,
    then the default service name is <code>TestService</code>.
</p>
    <p>The available command line options are:</p>
<p>
    <table>
    <tr><th>//TS</th>
        <td>Run the service as a console application</td>
        <td>This is the default operation. It is called if the no option is provided.
        </td>
    </tr>
    <tr><th>//RS</th>
        <td>Run the service</td>
        <td>Called only from ServiceManager</td>
    </tr>
    <tr><th>//SS</th>
        <td>Stop the service</td>
        <td></td>
    </tr>
    <tr><th>//US</th>
        <td>Update service parameters</td>
        <td></td>
    </tr>
    <tr><th>//IS</th>
        <td>Install service</td>
        <td></td>
    </tr>
    <tr><th>//DS</th>
        <td>Delete service</td>
        <td>Stops the service first if it is currently running</td>
    </tr>
    <tr><th>//PP[//seconds]</th>
        <td>Pause</td>
        <td>Default is 60 seconds</td>
    </tr>
    <tr><th>//VS</th>
        <td>Version</td>
        <td>Print version and exit (since version 1.0.3)</td>
    </tr>
    <tr><th>//?</th>
        <td>Help</td>
        <td>Print usage and exit (since version 1.0.3)</td>
    </tr>
    </table>
</p>
    <p>Starting with version <b>1.0.8</b> a more traditional command line can
    be used in the form: <b>--command [ServiceName]</b>.
</p>
<p>
    <table>
    <tr><th>--run</th>
        <td>Run the service as a console application</td>
        <td>This is the default operation. It is called if the no option is provided
        and has the same effect as calling <b>//TS</b>.
        </td>
    </tr>
    <tr><th>--service</th>
        <td>Run the service</td>
        <td>Called only from ServiceManager</td>
    </tr>
    <tr><th>--stop</th>
        <td>Stop the service</td>
        <td>Synonym for <b>//SS</b></td>
    </tr>
    <tr><th>--update</th>
        <td>Update service parameters</td>
        <td>Synonym for <b>//US</b></td>
    </tr>
    <tr><th>--install</th>
        <td>Install service</td>
        <td>Synonym for <b>//IS</b></td>
    </tr>
    <tr><th>--delete</th>
        <td>Delete service</td>
        <td>Stops the service first if it is currently running</td>
    </tr>
    <tr><th>--pause [seconds]</th>
        <td>Pause</td>
        <td>Default is 60 seconds</td>
    </tr>
    <tr><th>--version</th>
        <td>Version</td>
        <td>Print version and exit</td>
    </tr>
    <tr><th>--help</th>
        <td>Help</td>
        <td>Print usage and exit</td>
    </tr>
    </table>
</p>
</subsection>
<subsection name="Command line parameters">
<p>
    Each command parameter is prefixed with <b>--</b>.
    If an environment variable exists with the same name as command line parameter but
    prefixed with <code>PR_</code> it will take precedence.
    For example:
<source>set PR_CLASSPATH=xx.jar</source>
</p>
<p>is equivalent to providing
<source>--Classpath=xx.jar</source><commit_msg>Oops. Alternate command names don't have -- prefix<commit_after><?xml version="1.0"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<document>
 <properties>
  <title>Daemon : Procrun</title>
  <author email="<EMAIL>"><NAME></author>
 </properties>

<body>
<section name="Introduction">
<p>
    Procrun is a set of applications that allow Windows users to wrap
    (mostly) Java applications (e.g. Tomcat) as a Windows service.
    <br></br>
    The service can be set to automatically start when the machine boots
    and will continue to run with no user logged onto the machine.
</p>
</section>

<section name="Procrun monitor application">
<p>
    <b>Prunmgr</b> is a GUI application for monitoring and configuring procrun
    services.
</p>
<p>
    Each command line directive is in the form of <b>//XX[//ServiceName]</b>
</p>
<p>
    If the <code>//ServiceName</code> parameter is omitted, then the service name is
    assumed to be the name of the file.
    <br/>
    The Prunsrv application behaves in the same way,
    so to allow both applications to reside in the same directory, the Prunmgr application
    will remove a trailing <b>w</b> (lower-case w) from the name.
    <br/>
    For example if the Prunmgr application is renamed as <code>TestService.exe</code>
    - or as <code>TestServicew.exe</code> -
    then the default service name is <code>TestService</code>.
</p>
    <p>The available command line options are:</p>
<p>
    <table>
    <tr><th>//ES</th>
        <td>Edit service configuration</td>
        <td>This is the default operation. It is called if the no option is
            provided.
            Starts the GUI application which allows the service configuration
            to be modified, started and stopped.
        </td>
    </tr>
    <tr><th>//MS</th>
        <td>Monitor service</td>
        <td>Starts the GUI application and minimizes it to the system tray.
        </td>
    </tr>
    <tr><th>//MR</th>
        <td>Monitor &amp; run service</td>
        <td>Starts the GUI application and minimizes it to the system tray.
            Start the service if it is not currently running.
        </td>
    </tr>
    <tr><th>//MQ</th>
        <td>Monitor Quit</td>
        <td>Stop any running monitor for the service.
        </td>
    </tr>
    </table>
</p>
</section>

<section name="Procrun service application">
<p>
    <b>Prunsrv</b> is a service application for running applications as services.
    It can convert any application (not just Java applications) to run as a service.
</p>

<subsection name="Command line arguments">
<p>
    Each command line directive is in the form of <b>//XX[//ServiceName]</b>.
</p>
<p>
    If the <code>//ServiceName</code> parameter is omitted, then the service name is
    assumed to be the name of the file.
    <br/>
    For example if the application is renamed as <code>TestService.exe</code>,
    then the default service name is <code>TestService</code>.
</p>
    <p>The available command line options are:</p>
<p>
    <table>
    <tr><th>//TS</th>
        <td>Run the service as a console application</td>
        <td>This is the default operation. It is called if the no option is provided.
        </td>
    </tr>
    <tr><th>//RS</th>
        <td>Run the service</td>
        <td>Called only from ServiceManager</td>
    </tr>
    <tr><th>//SS</th>
        <td>Stop the service</td>
        <td></td>
    </tr>
    <tr><th>//US</th>
        <td>Update service parameters</td>
        <td></td>
    </tr>
    <tr><th>//IS</th>
        <td>Install service</td>
        <td></td>
    </tr>
    <tr><th>//DS</th>
        <td>Delete service</td>
        <td>Stops the service first if it is currently running</td>
    </tr>
    <tr><th>//PP[//seconds]</th>
        <td>Pause</td>
        <td>Default is 60 seconds</td>
    </tr>
    <tr><th>//VS</th>
        <td>Version</td>
        <td>Print version and exit (since version 1.0.3)</td>
    </tr>
    <tr><th>//?</th>
        <td>Help</td>
        <td>Print usage and exit (since version 1.0.3)</td>
    </tr>
    </table>
</p>
    <p>Starting with version <b>1.0.8</b> a more traditional command line can
    be used in the form: <b>command [ServiceName]</b>.
</p>
<p>
    <table>
    <tr><th>run</th>
        <td>Run the service as a console application</td>
        <td>This is the default operation. It is called if the no option is provided
        and has the same effect as calling <b>//TS</b>.
        </td>
    </tr>
    <tr><th>service</th>
        <td>Run the service</td>
        <td>Called only from ServiceManager</td>
    </tr>
    <tr><th>stop</th>
        <td>Stop the service</td>
        <td>Synonym for <b>//SS</b></td>
    </tr>
    <tr><th>update</th>
        <td>Update service parameters</td>
        <td>Synonym for <b>//US</b></td>
    </tr>
    <tr><th>install</th>
        <td>Install service</td>
        <td>Synonym for <b>//IS</b></td>
    </tr>
    <tr><th>delete</th>
        <td>Delete service</td>
        <td>Stops the service first if it is currently running</td>
    </tr>
    <tr><th>pause [seconds]</th>
        <td>Pause</td>
        <td>Default is 60 seconds</td>
    </tr>
    <tr><th>version</th>
        <td>Version</td>
        <td>Print version and exit</td>
    </tr>
    <tr><th>help</th>
        <td>Help</td>
        <td>Print usage and exit</td>
    </tr>
    </table>
</p>
</subsection>
<subsection name="Command line parameters">
<p>
    Each command parameter is prefixed with <b>--</b>.
    If an environment variable exists with the same name as command line parameter but
    prefixed with <code>PR_</code> it will take precedence.
    For example:
<source>set PR_CLASSPATH=xx.jar</source>
</p>
<p>is equivalent to providing
<source>--Classpath=xx.jar</source>
{'fraction_non_alphanumeric': 0.1388567461235825, 'fraction_numerical': 0.0029314201959422972, 'mean_word_length': 2.56251717504809, 'pattern_counts': {'":': 0, '<': 563, '<?xml version=': 2, '>': 563, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '782703', 'n_tokens_mistral': 4122, 'n_tokens_neox': 4076, 'n_words': 1459}