mirror of https://github.com/winsw/winsw
Revise docs for 3.0.0-alpha.8 (#768)
parent
78bb7627fa
commit
3f6bc3195f
|
@ -114,7 +114,6 @@ Most commands require Administrator privileges to execute. WinSW will prompt for
|
||||||
* [XML configuration file](docs/xml-config-file.md)
|
* [XML configuration file](docs/xml-config-file.md)
|
||||||
* [Logging and error reporting](docs/logging-and-error-reporting.md)
|
* [Logging and error reporting](docs/logging-and-error-reporting.md)
|
||||||
* [Extensions](docs/extensions/extensions.md)
|
* [Extensions](docs/extensions/extensions.md)
|
||||||
* [Shared Directory Mapper](docs/extensions/shared-directory-mapper.md)
|
|
||||||
* Use cases:
|
* Use cases:
|
||||||
* [Self-restarting services](docs/self-restarting-service.md)
|
* [Self-restarting services](docs/self-restarting-service.md)
|
||||||
* [Deferred file operations](docs/deferred-file-operations.md)
|
* [Deferred file operations](docs/deferred-file-operations.md)
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
# Shared Directory Mapper extension
|
|
||||||
|
|
||||||
By default Windows does not establish shared drive mapping for services even if it is configured in the Windows service profile.
|
|
||||||
And sometimes it is impossible to workaround it due to the domain policies.
|
|
||||||
|
|
||||||
This extension allows mapping external shared directories before starting up the executable.
|
|
||||||
|
|
||||||
Since: WinSW 2.0.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
The extension can be configured via the [XML configuration file](../xml-config-file.md).
|
|
||||||
Configuration sample:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<service>
|
|
||||||
<id>sampleService</id>
|
|
||||||
<name>Sample service</name>
|
|
||||||
<description>This is a stub service.</description>
|
|
||||||
<executable>%BASE%\sleep.bat</executable>
|
|
||||||
<arguments></arguments>
|
|
||||||
<log mode="roll"></log>
|
|
||||||
|
|
||||||
<extensions>
|
|
||||||
<extension enabled="true" className="winsw.Plugins.SharedDirectoryMapper.SharedDirectoryMapper" id="mapNetworDirs">
|
|
||||||
<mapping>
|
|
||||||
<map enabled="false" label="N:" uncpath="\\UNC"/>
|
|
||||||
<map enabled="false" label="M:" uncpath="\\UNC2"/>
|
|
||||||
</mapping>
|
|
||||||
</extension>
|
|
||||||
</extensions>
|
|
||||||
</service>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
* If the extension fails to map the drive, the startup fails
|
|
|
@ -19,3 +19,5 @@ TODO
|
||||||
1. Replace `<delayedAutoStart />` with `<delayedAutoStart>true</delayedAutoStart>`.
|
1. Replace `<delayedAutoStart />` with `<delayedAutoStart>true</delayedAutoStart>`.
|
||||||
1. Replace `<interactive />` with `<interactive>true</interactive>`.
|
1. Replace `<interactive />` with `<interactive>true</interactive>`.
|
||||||
1. Replace `<beeponshutdown />` with `<beeponshutdown>true</beeponshutdown>`.
|
1. Replace `<beeponshutdown />` with `<beeponshutdown>true</beeponshutdown>`.
|
||||||
|
1. Remove the `RunawayProcessKiller` extension.
|
||||||
|
1. Move `<mapping>.<map>` to `<service>.<sharedDirectoryMapping>.<map>`. Remove the `SharedDirectoryMapper` extension.
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Milestone management
|
||||||
|
|
||||||
|
[Milestones](https://github.com/winsw/winsw/milestones) are used to prioritize items.
|
||||||
|
|
||||||
|
- Place unplanned issues in `Future`.
|
||||||
|
- Place planned/WIP/done issues in `major.x`.
|
||||||
|
- When a new version is released, create a corresponding milestone `major.minor.patch` and move closed issues there.
|
|
@ -42,27 +42,32 @@ The default working directory of the wrapper and it's child processes is the dir
|
||||||
|
|
||||||
### id
|
### id
|
||||||
|
|
||||||
|
**Required**
|
||||||
Specifies the ID that Windows uses internally to identify the service.
|
Specifies the ID that Windows uses internally to identify the service.
|
||||||
This has to be unique among all the services installed in a system,
|
This has to be unique among all the services installed in a system,
|
||||||
and it should consist entirely out of alpha-numeric characters.
|
and it should consist entirely out of alpha-numeric characters.
|
||||||
|
|
||||||
### executable
|
### executable
|
||||||
|
|
||||||
|
**Required**
|
||||||
This element specifies the executable to be launched.
|
This element specifies the executable to be launched.
|
||||||
It can be either absolute path, or you can just specify the executable name and let it be searched from `PATH` (although note that the services often run in a different user account and therefore it might have different `PATH` than your shell does.)
|
It can be either absolute path, or you can just specify the executable name and let it be searched from `PATH` (although note that the services often run in a different user account and therefore it might have different `PATH` than your shell does.)
|
||||||
|
|
||||||
### name
|
### name
|
||||||
|
|
||||||
|
**Optional**
|
||||||
Short display name of the service, which can contain spaces and other characters.
|
Short display name of the service, which can contain spaces and other characters.
|
||||||
This shouldn't be too long, like `<id>`, and this also needs to be unique among all the services in a given system.
|
This shouldn't be too long, like `<id>`, and this also needs to be unique among all the services in a given system.
|
||||||
|
|
||||||
### description
|
### description
|
||||||
|
|
||||||
|
**Optional**
|
||||||
Long human-readable description of the service.
|
Long human-readable description of the service.
|
||||||
This gets displayed in Windows service manager when the service is selected.
|
This gets displayed in Windows service manager when the service is selected.
|
||||||
|
|
||||||
### startmode
|
### startmode
|
||||||
|
|
||||||
|
**Optional**
|
||||||
This element specifies the start mode of the Windows service.
|
This element specifies the start mode of the Windows service.
|
||||||
It can be one of the following values: Automatic, or Manual.
|
It can be one of the following values: Automatic, or Manual.
|
||||||
For more information, see the [ChangeStartMode method](https://docs.microsoft.com/windows/win32/cimwin32prov/changestartmode-method-in-class-win32-service).
|
For more information, see the [ChangeStartMode method](https://docs.microsoft.com/windows/win32/cimwin32prov/changestartmode-method-in-class-win32-service).
|
||||||
|
@ -70,6 +75,7 @@ The default value is `Automatic`.
|
||||||
|
|
||||||
### delayedAutoStart
|
### delayedAutoStart
|
||||||
|
|
||||||
|
**Optional**
|
||||||
This Boolean option enables the delayed start mode if the `Automatic` start mode is defined.
|
This Boolean option enables the delayed start mode if the `Automatic` start mode is defined.
|
||||||
For more information, see [Startup Processes and Delayed Automatic Start](https://techcommunity.microsoft.com/t5/ask-the-performance-team/ws2008-startup-processes-and-delayed-automatic-start/ba-p/372692).
|
For more information, see [Startup Processes and Delayed Automatic Start](https://techcommunity.microsoft.com/t5/ask-the-performance-team/ws2008-startup-processes-and-delayed-automatic-start/ba-p/372692).
|
||||||
|
|
||||||
|
@ -82,6 +88,7 @@ Windows service installation may fail in such case.
|
||||||
|
|
||||||
### depend
|
### depend
|
||||||
|
|
||||||
|
**Optional**
|
||||||
Specify IDs of other services that this service depends on.
|
Specify IDs of other services that this service depends on.
|
||||||
When service `X` depends on service `Y`, `X` can only run if `Y` is running.
|
When service `X` depends on service `Y`, `X` can only run if `Y` is running.
|
||||||
|
|
||||||
|
@ -94,12 +101,14 @@ Multiple elements can be used to specify multiple dependencies.
|
||||||
|
|
||||||
### logging
|
### logging
|
||||||
|
|
||||||
|
**Optional**
|
||||||
Optionally set a different logging directory with `<logpath>` and startup `mode`: append (default), reset (clear log), ignore, roll (move to `\*.old`).
|
Optionally set a different logging directory with `<logpath>` and startup `mode`: append (default), reset (clear log), ignore, roll (move to `\*.old`).
|
||||||
|
|
||||||
See the [Logging and error reporting](logging-and-error-reporting.md) page for more info.
|
See the [Logging and error reporting](logging-and-error-reporting.md) page for more info.
|
||||||
|
|
||||||
### Arguments
|
### Arguments
|
||||||
|
|
||||||
|
**Optional**
|
||||||
The `<arguments>` element specifies the arguments to be passed to the executable.
|
The `<arguments>` element specifies the arguments to be passed to the executable.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
|
@ -118,6 +127,7 @@ The `<arguments>` element specifies the arguments to be passed to the executable
|
||||||
|
|
||||||
### stopargument/stopexecutable
|
### stopargument/stopexecutable
|
||||||
|
|
||||||
|
**Optional**
|
||||||
~~When the service is requested to stop, winsw simply calls [TerminateProcess function](https://docs.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess) to kill the service instantly.~~
|
~~When the service is requested to stop, winsw simply calls [TerminateProcess function](https://docs.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess) to kill the service instantly.~~
|
||||||
However, if the `<stoparguments>` element is present, winsw will instead launch another process of `<executable>` (or `<stopexecutable>` if that's specified) with the specified arguments, and expects that to initiate the graceful shutdown of the service process.
|
However, if the `<stoparguments>` element is present, winsw will instead launch another process of `<executable>` (or `<stopexecutable>` if that's specified) with the specified arguments, and expects that to initiate the graceful shutdown of the service process.
|
||||||
|
|
||||||
|
@ -446,6 +456,19 @@ Automatically refreshes the service properties when the service starts or the fo
|
||||||
- [start](cli-commands.md#start-command)
|
- [start](cli-commands.md#start-command)
|
||||||
- [stop](cli-commands.md#stop-command)
|
- [stop](cli-commands.md#stop-command)
|
||||||
- [restart](cli-commands.md#restart-command)
|
- [restart](cli-commands.md#restart-command)
|
||||||
- [test](cli-commands.md#test-command)
|
|
||||||
|
|
||||||
The default value is `true`.
|
The default value is `true`.
|
||||||
|
|
||||||
|
### `sharedDirectoryMapping`
|
||||||
|
|
||||||
|
By default Windows does not establish shared drive mapping for services even if it is configured in the Windows service profile.
|
||||||
|
And sometimes it is impossible to workaround it due to the domain policies.
|
||||||
|
|
||||||
|
This allows mapping external shared directories before starting up the executable.
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<sharedDirectoryMapping>
|
||||||
|
<map label="N:" uncpath="\\UNC" />
|
||||||
|
<map label="M:" uncpath="\\UNC2" />
|
||||||
|
</sharedDirectoryMapping>
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue