mirror of https://github.com/winsw/winsw
Issue #154 - Provide a sample configuration file with all options and documentation
parent
0c8a5e6ee0
commit
db8c6ec6f2
|
@ -0,0 +1,286 @@
|
|||
<!--
|
||||
Copyright (c) 2016 Oleg Nenashev and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
software and associated documentation files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!--
|
||||
- This is a sample configuration of the Windows Service Wrapper.
|
||||
- This configuration file should be placed near the WinSW executable, the name should be the same.
|
||||
- E.g. for myapp.exe the configuration file name should be myapp.xml
|
||||
-
|
||||
- You can find more information about the parameters here: https://github.com/kohsuke/winsw/blob/master/doc/xmlConfigFile.md
|
||||
-->
|
||||
<configuration>
|
||||
|
||||
<!--
|
||||
SECTION: Mandatory options
|
||||
All options in other sections are optional
|
||||
-->
|
||||
|
||||
<!-- ID of the service. It should be unique accross the Windows system-->
|
||||
<id>myapp</id>
|
||||
<!-- Display name of the service -->
|
||||
<name>MyApp Service (powered by WinSW)</name>
|
||||
<!-- Service description -->
|
||||
<description>This service is a service cratead from a sample configuration</description>
|
||||
|
||||
<!-- Path to the executable, which should be started -->
|
||||
<executable>%BASE%\myExecutable.exe</executable>
|
||||
|
||||
<!--
|
||||
SECTION: Installation
|
||||
These options are being used during the installation only.
|
||||
Their modification will not take affect without the service re-installation.
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: serviceaccount
|
||||
Defines account, under which the service should run.
|
||||
-->
|
||||
<!--
|
||||
<serviceaccount>
|
||||
<domain>YOURDOMAIN</domain>
|
||||
<user>useraccount</user>
|
||||
<password>Pa55w0rd</password>
|
||||
<allowservicelogon>true</allowservicelogon>
|
||||
</serviceaccount>
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: onfailure
|
||||
Defines a sequence of actions, which should be performed if the managed executable fails.
|
||||
Supported actions: restart, reboot, none
|
||||
-->
|
||||
<!--
|
||||
<onfailure action="restart" delay="10 sec"/>
|
||||
<onfailure action="restart" delay="20 sec"/>
|
||||
<onfailure action="reboot" />
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: resetfailure
|
||||
Time, after which the Windows service resets the failure status.
|
||||
Default value: 1 day
|
||||
-->
|
||||
<!--
|
||||
<resetfailure>1 hour</resetfailure>
|
||||
-->
|
||||
|
||||
<!--
|
||||
SECTION: Executable management
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: arguments
|
||||
Arguments, which should be passed to the executable
|
||||
-->
|
||||
<!--
|
||||
<arguments>-classpath c:\cygwin\home\kohsuke\ws\hello-world\out\production\hello-world test.Main</arguments>
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: startarguments
|
||||
Arguments, which should be passed to the executable when it starts
|
||||
If specified, overrides 'arguments'.
|
||||
-->
|
||||
<!--
|
||||
<startarguments></startarguments>
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: workingdirectory
|
||||
If specified, sets the default working directory of the executable
|
||||
Default value: Directory of the service wrapper executable.
|
||||
-->
|
||||
<!--
|
||||
<workingdirectory>C:\myApp\work</workingdirectory>
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: priority
|
||||
Desired process priority.
|
||||
Possible values: Normal, Idle, High, RealTime, BelowNormal, AboveNormal
|
||||
Default value: Normal
|
||||
-->
|
||||
<priority>Normal</priority>
|
||||
|
||||
<!--
|
||||
OPTION: stoptimeout
|
||||
Time to wait for the service to gracefully shutdown the executable before we forcibly kill it
|
||||
Default value: 15 seconds
|
||||
-->
|
||||
<stoptimeout>15 sec</stoptimeout>
|
||||
|
||||
<!--
|
||||
OPTION: stopparentprocessfirst
|
||||
If set, WinSW will terminate the parent process before stopping the children.
|
||||
Default value: false
|
||||
-->
|
||||
<stopparentprocessfirst>false</stopparentprocessfirst>
|
||||
|
||||
|
||||
<!--
|
||||
OPTION: stopexecutable
|
||||
Path to an optional executable, which performs shutdown of the service.
|
||||
This executable will be used if and only if 'stoparguments' are specified.
|
||||
If 'stoparguments' are defined without this option, 'executable' will be used as a stop executable
|
||||
-->
|
||||
<!--
|
||||
<stopexecutable>%BASE%\stop.exe</stopexecutable>
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: stoparguments
|
||||
Additional arguments, which should be passed to the stop executable during termination.
|
||||
This OPTION also enables termination of the executable via stop executable
|
||||
-->
|
||||
<!--<stoparguments>--stop true</stoparguments>-->
|
||||
|
||||
<!--
|
||||
<!--
|
||||
SECTION: Service management
|
||||
-->
|
||||
<!--
|
||||
OPTION: startmode
|
||||
Defines start mode of the service.
|
||||
Supported modes: Automatic, Manual, Boot, System (latter ones are supported for driver services only)
|
||||
Default mode: Automatic
|
||||
-->
|
||||
<startmode>Automatic</startmode>
|
||||
|
||||
<!--
|
||||
OPTION: depend
|
||||
Optionally specifies services that must start before this service starts.
|
||||
-->
|
||||
<!--
|
||||
<depend>Eventlog</depend>
|
||||
<depend>W32Time</depend>
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: waithint
|
||||
The estimated time required for a pending stop operation.
|
||||
Before the specified amount of time has elapsed, the service should make its next call to the SetServiceStatus function.
|
||||
Otherwise the service will be marked as non-responding
|
||||
Default value: 15 seconds
|
||||
-->
|
||||
<waithint>15 sec</waithint>
|
||||
|
||||
<!--
|
||||
OPTION: sleeptime
|
||||
The time before the service should make its next call to the SetServiceStatus function.
|
||||
Do not wait longer than the wait hint. A good interval is one-tenth of the wait hint but not less than 1 second and not more than 10 seconds.
|
||||
Default value: 1 second
|
||||
-->
|
||||
<sleeptime>1 sec</sleeptime>
|
||||
|
||||
<!--
|
||||
OPTION: interactive
|
||||
Indicates the service can interactwith the desktop.
|
||||
-->
|
||||
<!--
|
||||
<interactive/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
SECTION:Logging
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: logpath
|
||||
Sets a custom logging directory for all logs being produced by the service wrapper
|
||||
Default value: Directory, which contains the executor
|
||||
-->
|
||||
<logpath></logpath>
|
||||
|
||||
<!--
|
||||
OPTION: log
|
||||
Defines logging mode for logs produced by the executable.
|
||||
Supported modes:
|
||||
* append - Rust update the existing log
|
||||
* none - Do not save executable logs to the disk
|
||||
* reset - Wipe the log files on startup
|
||||
* roll - Rotate logs based on size
|
||||
* roll-by-time - Rotate logs based on time
|
||||
* rotate - Rotate logs based on size, (8 logs, 10MB each). This mode is deprecated, use "roll"
|
||||
Default mode: append
|
||||
|
||||
Each mode has different settings.
|
||||
See https://github.com/kohsuke/winsw/blob/master/doc/loggingAndErrorReporting.md for more details
|
||||
-->
|
||||
<log mode="append">
|
||||
<!--
|
||||
<setting1/>
|
||||
<setting2/>
|
||||
-->
|
||||
</log>
|
||||
|
||||
<!--
|
||||
SECTION: Environment setup
|
||||
-->
|
||||
<!--
|
||||
OPTION: env
|
||||
Sets or overrides environment variables.
|
||||
There may be multiple entries configured on the top level.
|
||||
-->
|
||||
<!--
|
||||
<env name="MY_TOOL_HOME" value="C:\etc\tools\myTool" />
|
||||
<env name="LM_LICENSE_FILE" value="host1;host2" />
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
OPTION: download
|
||||
List of downloads to be performed by the wrapper before starting
|
||||
-->
|
||||
<!--
|
||||
<download from="http://www.google.com/" to="%BASE%\index.html" />
|
||||
<download from="http://www.nosuchhostexists.com/" to="%BASE%\dummy.html" />
|
||||
-->
|
||||
|
||||
<!--
|
||||
SECTION: Other options
|
||||
-->
|
||||
|
||||
<!--
|
||||
OPTION: beeponshutdown
|
||||
Indicates the service should beep when finished on shutdown (if it's supported by OS).
|
||||
-->
|
||||
<!--
|
||||
<beeponshutdown/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
SECTION: Extensions
|
||||
This configuration section allows specifying custom extensions.
|
||||
More info is available here: https://github.com/kohsuke/winsw/blob/master/doc/extensions/extensions.md
|
||||
-->
|
||||
|
||||
<!--
|
||||
<extensions>
|
||||
Extension 1: id values must be unique
|
||||
<extension enabled="true" id="extension1" className="winsw.Plugins.SharedDirectoryMapper.SharedDirectoryMapper">
|
||||
<mapping>
|
||||
<map enabled="false" label="N:" uncpath="\\UNC"/>
|
||||
<map enabled="false" label="M:" uncpath="\\UNC2"/>
|
||||
</mapping>
|
||||
</extension>
|
||||
...
|
||||
</extensions>
|
||||
-->
|
||||
|
||||
</configuration>
|
Loading…
Reference in New Issue