complete.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <!--
  2. MIT License
  3. Copyright (c) 2008-2020 Kohsuke Kawaguchi, Sun Microsystems, Inc., CloudBees,
  4. Inc., Oleg Nenashev and other contributors
  5. Permission is hereby granted, free of charge, to any person obtaining a copy
  6. of this software and associated documentation files (the "Software"), to deal
  7. in the Software without restriction, including without limitation the rights
  8. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. copies of the Software, and to permit persons to whom the Software is
  10. furnished to do so, subject to the following conditions:
  11. The above copyright notice and this permission notice shall be included in all
  12. copies or substantial portions of the Software.
  13. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  19. SOFTWARE.
  20. -->
  21. <!--
  22. This is a sample configuration of the Windows Service Wrapper.
  23. This configuration file should be placed near the WinSW executable, the name should be the same.
  24. E.g. for myapp.exe the configuration file name should be myapp.xml
  25. You can find more information about configuration options here: https://github.com/winsw/winsw/blob/master/docs/xml-config-file.md
  26. -->
  27. <service>
  28. <!--
  29. SECTION: Mandatory options
  30. All options in other sections are optional
  31. -->
  32. <!-- ID of the service. It should be unique accross the Windows system. -->
  33. <id>myapp</id>
  34. <!-- Path to the executable, which should be started. -->
  35. <executable>%BASE%\myExecutable.exe</executable>
  36. <!-- Display name of the service. -->
  37. <!--
  38. <name>MyApp Service (powered by WinSW)</name>
  39. -->
  40. <!-- Service description. -->
  41. <!--
  42. <description>This service is a service created from a sample configuration</description>
  43. -->
  44. <!--
  45. SECTION: Installation
  46. These options are being used during the installation only.
  47. Their modification will not take affect without the service re-installation.
  48. -->
  49. <!--
  50. OPTION: serviceaccount
  51. Defines account, under which the service should run.
  52. -->
  53. <!--
  54. <serviceaccount>
  55. <username>YOURDOMAIN\useraccount</username>
  56. <password>Pa55w0rd</password>
  57. <allowservicelogon>true</allowservicelogon>
  58. </serviceaccount>
  59. -->
  60. <!--
  61. OPTION: onfailure
  62. Defines a sequence of actions, which should be performed if the managed executable fails.
  63. Supported actions: restart, reboot, none
  64. -->
  65. <!--
  66. <onfailure action="restart" delay="10 sec"/>
  67. <onfailure action="restart" delay="20 sec"/>
  68. <onfailure action="reboot" />
  69. -->
  70. <!--
  71. OPTION: resetfailure
  72. Time, after which the Windows service resets the failure status.
  73. Default value: 1 day
  74. -->
  75. <!--
  76. <resetfailure>1 hour</resetfailure>
  77. -->
  78. <!--
  79. OPTION: securityDescriptor
  80. The security descriptor string for the service in SDDL form.
  81. For more information, see https://docs.microsoft.com/windows/win32/secauthz/security-descriptor-definition-language.
  82. -->
  83. <!--<securityDescriptor></securityDescriptor>-->
  84. <!--
  85. SECTION: Executable management
  86. -->
  87. <!--
  88. OPTION: arguments
  89. Arguments, which should be passed to the executable.
  90. -->
  91. <!--
  92. <arguments>-classpath c:\cygwin\home\kohsuke\ws\hello-world\out\production\hello-world test.Main</arguments>
  93. -->
  94. <!--
  95. OPTION: startarguments
  96. Arguments, which should be passed to the executable when it starts.
  97. If specified, overrides 'arguments'.
  98. -->
  99. <!--
  100. <startarguments></startarguments>
  101. -->
  102. <!--
  103. OPTION: workingdirectory
  104. If specified, sets the default working directory of the executable.
  105. Default value: Directory of the service wrapper executable.
  106. -->
  107. <!--
  108. <workingdirectory>C:\myApp\work</workingdirectory>
  109. -->
  110. <!--
  111. OPTION: hidewindow
  112. When true, starts the executable with CreateNoWindow=true (no console window).
  113. Default value: false
  114. -->
  115. <!--
  116. <hidewindow>true</hidewindow>
  117. -->
  118. <!--
  119. OPTION: priority
  120. Desired process priority.
  121. Possible values: Normal, Idle, High, RealTime, BelowNormal, AboveNormal
  122. Default value: Normal
  123. -->
  124. <priority>Normal</priority>
  125. <!--
  126. OPTION: stoptimeout
  127. Time to wait for the service to gracefully shutdown the executable before we forcibly kill it.
  128. Default value: 15 seconds
  129. -->
  130. <stoptimeout>15 sec</stoptimeout>
  131. <!--
  132. OPTION: stopexecutable
  133. Path to an optional executable, which performs shutdown of the service.
  134. This executable will be used if and only if 'stoparguments' are specified.
  135. If 'stoparguments' are defined without this option, 'executable' will be used as a stop executable.
  136. -->
  137. <!--
  138. <stopexecutable>%BASE%\stop.exe</stopexecutable>
  139. -->
  140. <!--
  141. OPTION: stoparguments
  142. Additional arguments, which should be passed to the stop executable during termination.
  143. This OPTION also enables termination of the executable via stop executable.
  144. -->
  145. <!--
  146. <stoparguments>-stop true</stoparguments>
  147. -->
  148. <!--
  149. SECTION: Service management
  150. -->
  151. <!--
  152. OPTION: startmode
  153. Defines start mode of the service.
  154. Supported modes: Automatic, Manual, Boot, System (latter ones are supported for driver services only)
  155. Default mode: Automatic
  156. -->
  157. <startmode>Automatic</startmode>
  158. <!--
  159. OPTION: delayedAutoStart
  160. Enables the Delayed Automatic Start if 'Automatic' is specified in the 'startmode' field.
  161. See the WinSW documentation to get info about supported platform versions and limitations.
  162. -->
  163. <!--<delayedAutoStart>true</delayedAutoStart>-->
  164. <!--
  165. OPTION: depend
  166. Optionally specifies services that must start before this service starts.
  167. -->
  168. <!--
  169. <depend>Eventlog</depend>
  170. <depend>W32Time</depend>
  171. -->
  172. <!--
  173. OPTION: interactive
  174. Indicates the service can interact with the desktop.
  175. -->
  176. <!--
  177. <interactive>true</interactive>
  178. -->
  179. <!--
  180. SECTION:Logging
  181. -->
  182. <!--
  183. OPTION: logpath
  184. Sets a custom logging directory for all logs being produced by the service wrapper.
  185. Default value: Directory, which contains the executor.
  186. -->
  187. <!--
  188. <logpath>%BASE%\logs</logpath>
  189. -->
  190. <!--
  191. OPTION: log
  192. Defines logging mode for logs produced by the executable.
  193. Supported modes:
  194. * append - Just update the existing log
  195. * none - Do not save executable logs to the disk
  196. * reset - Wipe the log files on startup
  197. * roll - Roll logs based on size
  198. * roll-by-time - Roll logs based on time
  199. * rotate - Rotate logs based on size, (8 logs, 10MB each). This mode is deprecated, use "roll"
  200. Default mode: append
  201. Each mode has different settings.
  202. See https://github.com/winsw/winsw/blob/master/docs/logging-and-error-reporting.md for more details
  203. -->
  204. <log mode="append">
  205. <!--
  206. <setting1/>
  207. <setting2/>
  208. -->
  209. </log>
  210. <!--
  211. SECTION: Environment setup
  212. -->
  213. <!--
  214. OPTION: env
  215. Sets or overrides environment variables.
  216. There may be multiple entries configured on the top level.
  217. -->
  218. <!--
  219. <env name="MY_TOOL_HOME" value="C:\etc\tools\myTool" />
  220. <env name="LM_LICENSE_FILE" value="host1;host2" />
  221. -->
  222. <!--
  223. OPTION: download
  224. List of downloads to be performed by the wrapper before starting.
  225. -->
  226. <!--
  227. <download from="http://www.google.com/" to="%BASE%\index.html" />
  228. Download and fail the service startup on Error:
  229. <download from="http://www.nosuchhostexists.com/" to="%BASE%\dummy.html" failOnError="true"/>
  230. An example for unsecure Basic authentication because the connection is not encrypted:
  231. <download from="http://example.com/some.dat" to="%BASE%\some.dat"
  232. auth="basic" unsecureAuth="true"
  233. username="aUser" password="aPassw0rd" />
  234. Secure Basic authentication via HTTPS:
  235. <download from="https://example.com/some.dat" to="%BASE%\some.dat"
  236. auth="basic" username="aUser" password="aPassw0rd" />
  237. Secure authentication when the target server and the client are members of the same domain or
  238. the server domain and the client domain belong to the same forest with a trust:
  239. <download from="https://example.com/some.dat" to="%BASE%\some.dat" auth="sspi" />
  240. -->
  241. <!--
  242. SECTION: Other options
  243. -->
  244. <!--
  245. OPTION: beeponshutdown
  246. Indicates the service should beep when finished on shutdown (if it's supported by OS).
  247. -->
  248. <!--
  249. <beeponshutdown>true</beeponshutdown>
  250. -->
  251. <!--
  252. SECTION: Extensions
  253. This configuration section allows specifying custom extensions.
  254. More info is available here: https://github.com/winsw/winsw/blob/master/docs/extensions/extensions.md
  255. -->
  256. <!--
  257. <extensions>
  258. Extension 1: id values must be unique
  259. <extension enabled="true" id="extension1" className="winsw.Plugins.SharedDirectoryMapper.SharedDirectoryMapper">
  260. <mapping>
  261. <map enabled="false" label="N:" uncpath="\\UNC"/>
  262. <map enabled="false" label="M:" uncpath="\\UNC2"/>
  263. </mapping>
  264. </extension>
  265. ...
  266. </extensions>
  267. -->
  268. </service>