瀏覽代碼

Revise docs for 3.0.0-alpha.8 (#768)

Next Turn 4 年之前
父節點
當前提交
3f6bc3195f
共有 5 個文件被更改,包括 33 次插入40 次删除
  1. 0 1
      README.md
  2. 0 38
      docs/extensions/shared-directory-mapper.md
  3. 2 0
      docs/migrate-to-3-x.md
  4. 7 0
      docs/project/milestone-management.md
  5. 24 1
      docs/xml-config-file.md

+ 0 - 1
README.md

@@ -114,7 +114,6 @@ Most commands require Administrator privileges to execute. WinSW will prompt for
   * [XML configuration file](docs/xml-config-file.md)
   * [Logging and error reporting](docs/logging-and-error-reporting.md)
   * [Extensions](docs/extensions/extensions.md)
-    * [Shared Directory Mapper](docs/extensions/shared-directory-mapper.md)
 * Use cases:
   * [Self-restarting services](docs/self-restarting-service.md)
   * [Deferred file operations](docs/deferred-file-operations.md)

+ 0 - 38
docs/extensions/shared-directory-mapper.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

+ 2 - 0
docs/migrate-to-3-x.md

@@ -19,3 +19,5 @@ TODO
 1. Replace `<delayedAutoStart />` with `<delayedAutoStart>true</delayedAutoStart>`.
 1. Replace `<interactive />` with `<interactive>true</interactive>`.
 1. Replace `<beeponshutdown />` with `<beeponshutdown>true</beeponshutdown>`.
+1. Remove the `RunawayProcessKiller` extension.
+1. Move `<mapping>.<map>` to `<service>.<sharedDirectoryMapping>.<map>`. Remove the `SharedDirectoryMapper` extension.

+ 7 - 0
docs/project/milestone-management.md

@@ -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.

+ 24 - 1
docs/xml-config-file.md

@@ -42,27 +42,32 @@ The default working directory of the wrapper and it's child processes is the dir
 
 ### id
 
+**Required**
 Specifies the ID that Windows uses internally to identify the service.
 This has to be unique among all the services installed in a system,
   and it should consist entirely out of alpha-numeric characters.
 
 ### executable
 
+**Required**
 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.)
 
 ### name
 
+**Optional**
 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.
 
 ### description
 
+**Optional**
 Long human-readable description of the service.
 This gets displayed in Windows service manager when the service is selected.
 
 ### startmode
 
+**Optional**
 This element specifies the start mode of the Windows service.
 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).
@@ -70,6 +75,7 @@ The default value is `Automatic`.
 
 ### delayedAutoStart
 
+**Optional**
 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).
 
@@ -82,6 +88,7 @@ Windows service installation may fail in such case.
 
 ### depend
 
+**Optional**
 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.
 
@@ -94,12 +101,14 @@ Multiple elements can be used to specify multiple dependencies.
 
 ### logging
 
+**Optional**
 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.
 
 ### Arguments
 
+**Optional**
 The `<arguments>` element specifies the arguments to be passed to the executable.
 
 ```xml
@@ -118,6 +127,7 @@ The `<arguments>` element specifies the arguments to be passed to the executable
 
 ### 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.~~
 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)
 - [stop](cli-commands.md#stop-command)
 - [restart](cli-commands.md#restart-command)
-- [test](cli-commands.md#test-command)
 
 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>
+```