mirror of
https://github.com/winsw/winsw.git
synced 2025-12-10 18:37:28 +08:00
Revise docs for 3.0.0-alpha.1 (#587)
* Add pre-release badge * Update XML spec for `<username>` * Update exit codes * Update XML spec for `<prompt>` * Create migration guide * Add a note for the previous version * docs -> documentation * * Format usage * Talk to myself * * Add deployment status badge * Update version strings * Update README title * Link to the migration guide * * Remove .NET Core version number * Delete exe-config-file.md * Update README.md * migration-guide.md -> migrate-to-3-x.md
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
# EXE configuration file
|
||||
|
||||
In addition to the [XML configuration file](xml-config-file.md), WinSW uses a standard .NET *WinSW.exe.config* file, which allows setting up some custom settings.
|
||||
|
||||
Use-cases:
|
||||
* Managing Logging levels of log4j
|
||||
* etc.
|
||||
@@ -10,7 +10,7 @@ These extensions allow to alter the behavior of the Windows service in order to
|
||||
|
||||
## Developer guide
|
||||
|
||||
In WinSW v2 the extension does not support inclusion of external extension DLLs.
|
||||
In the current versions of WinSW the extension does not support inclusion of external extension DLLs.
|
||||
|
||||
### Adding external extensions
|
||||
|
||||
@@ -30,4 +30,4 @@ See configuration samples provided for the extensions in the core.
|
||||
For extensions from external DLLs, the `className` field should also specify the assembly name.
|
||||
It can be done via fully qualified class name or just by the `${CLASS_NAME}, ${ASSEMBLY_NAME}` declaration.
|
||||
|
||||
Please note that in the current versions of WinSW v2 the binary compatibility of extension APIs **is not guaranteed**.
|
||||
Please note that in the current versions of WinSW the binary compatibility of extension APIs **is not guaranteed**.
|
||||
|
||||
@@ -109,7 +109,6 @@ The zipDateFormat can only be used in conjection with autoRollAtTime, provide th
|
||||
|
||||
## Error reporting
|
||||
|
||||
WinSW uses WMI underneath, and as such it uses its error code as the exit code.
|
||||
For the complete list of exit codes, see [return values of the Create method of the Win32_Service class](https://docs.microsoft.com/windows/win32/cimwin32prov/create-method-in-class-win32-service#return-value).
|
||||
WinSW exits with code 0 on success. Any positive exit code is a [system error code](https://docs.microsoft.com/windows/win32/debug/system-error-codes).
|
||||
|
||||
When winsw is running as a service, more detailed error information is reported to the Windows event log.
|
||||
|
||||
11
docs/migrate-to-3-x.md
Normal file
11
docs/migrate-to-3-x.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Migrate to 3.x
|
||||
|
||||
## Automatic migration
|
||||
|
||||
TODO
|
||||
|
||||
## Manual migration
|
||||
|
||||
1. Remove `<stopparentprocessfirst>`.
|
||||
1. Merge `<domain>DomainName</domain>` and `<user>UserName</user>` into `<username>DomainName\UserName</username>`. If the user account belongs to the built-in domain, you can specify `<username>.\UserName</username>`.
|
||||
- Consider removing `<password>` from config file and using `<prompt>` in interactive context.
|
||||
@@ -209,7 +209,7 @@ Examples:
|
||||
|
||||
This is another useful building block for developing a self-updating service.
|
||||
|
||||
Since v2.7, if the destination file exists, WinSW will send its last write time in the `If-Modified-Since` header and skip downloading if `304 Not Modified` is received.
|
||||
Since 2.7, if the destination file exists, WinSW will send its last write time in the `If-Modified-Since` header and skip downloading if `304 Not Modified` is received.
|
||||
|
||||
### log
|
||||
|
||||
@@ -271,14 +271,13 @@ To use a user account, specify a `<serviceaccount>` element like this:
|
||||
|
||||
```xml
|
||||
<serviceaccount>
|
||||
<domain>YOURDOMAIN</domain>
|
||||
<user>useraccount</user>
|
||||
<username>DomainName\UserName</username>
|
||||
<password>Pa55w0rd</password>
|
||||
<allowservicelogon>true</allowservicelogon>
|
||||
</serviceaccount>
|
||||
```
|
||||
|
||||
The `<domain>` is optional and defaults to the local computer.
|
||||
The `<username>` is in the form `DomainName\UserName` or `UserName@DomainName`. If the account belongs to the built-in domain, you can specify `.\UserName`.
|
||||
|
||||
The `<allowservicelogon>` is optional.
|
||||
If set to `true`, will automatically set the "Allow Log On As A Service" right to the listed account.
|
||||
@@ -287,8 +286,7 @@ To use [Group Managed Service Accounts](https://docs.microsoft.com/windows-serve
|
||||
|
||||
```xml
|
||||
<serviceaccount>
|
||||
<domain>YOURDOMAIN</domain>
|
||||
<user>gmsa_account$</user>
|
||||
<username>DomainName\GmsaUserName$</username>
|
||||
<allowservicelogon>true</allowservicelogon>
|
||||
</serviceaccount>
|
||||
```
|
||||
@@ -299,7 +297,7 @@ To explicitly use the [LocalSystem account](https://docs.microsoft.com/windows/w
|
||||
|
||||
```xml
|
||||
<serviceaccount>
|
||||
<user>LocalSystem</user>
|
||||
<username>LocalSystem</username>
|
||||
</serviceaccount>
|
||||
```
|
||||
|
||||
@@ -311,8 +309,7 @@ To use the [LocalService account](https://docs.microsoft.com/windows/win32/servi
|
||||
|
||||
```xml
|
||||
<serviceaccount>
|
||||
<domain>NT AUTHORITY</domain>
|
||||
<user>LocalService</user>
|
||||
<username>NT AUTHORITY\LocalService</username>
|
||||
</serviceaccount>
|
||||
```
|
||||
|
||||
@@ -324,13 +321,30 @@ To use the [NetworkService account](https://docs.microsoft.com/windows/win32/ser
|
||||
|
||||
```xml
|
||||
<serviceaccount>
|
||||
<domain>NT AUTHORITY</domain>
|
||||
<user>NetworkService</user>
|
||||
<username>NT AUTHORITY\NetworkService</username>
|
||||
</serviceaccount>
|
||||
```
|
||||
|
||||
Note that this account does not have a password, so any password provided is ignored.
|
||||
|
||||
#### `prompt`
|
||||
|
||||
Optional. Prompts for a user name and a password.
|
||||
|
||||
```xml
|
||||
<serviceaccount>
|
||||
<prompt>dialog|console</prompt>
|
||||
<serviceaccount>
|
||||
```
|
||||
|
||||
- `dialog`
|
||||
|
||||
Prompts using a dialog box.
|
||||
|
||||
- `console`
|
||||
|
||||
Prompts at the console.
|
||||
|
||||
### Working directory
|
||||
|
||||
Some services need to run with a working directory specified.
|
||||
|
||||
Reference in New Issue
Block a user