<!-- ID of the service. It should be unique across the Windows system-->
<id>webdav-aliyundriver</id>
<!-- Display name of the service -->
<name>webdav-aliyundriver</name>
<!-- Service description -->
<description>webdav-aliyundriver</description>
<!-- Path to the executable, which should be started -->
<executable>java</executable>
<!--
aliyundrive.refresh-token 填写TOKEN
server.port 填写端口
这里出于避免与其它服务冲突将其默认8080修改为8181,当然你也可以修改成自己的端口
-->
<arguments>-jar webdav-aliyundriver-2.4.2.jar --aliyundrive.refresh-token="填写TOKEN" --server.port="8181" --aliyundrive.auth.enable=true --aliyundrive.auth.user-name="admin" --aliyundrive.auth.password="admin"</arguments>
<!--
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"/>
<!--
OPTION: resetfailure
Time, after which the Windows service resets the failure status.
Default value: 1 day
-->
<resetfailure>1 hour</resetfailure>
<!--
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: 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>
<waithint>15 sec</waithint>
<sleeptime>1 sec</sleeptime>