From 0d171e693a0cd590b45dfa5ccec5e324738b2005 Mon Sep 17 00:00:00 2001 From: NextTurn <45985406+NextTurn@users.noreply.github.com> Date: Wed, 22 Jul 2020 00:00:00 +0800 Subject: [PATCH 01/18] Update links --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 192ccec3..fdff4239 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,7 @@ User documentation: * [Installation guide](docs/installation.md) - Describes the installation process for different systems and .NET versions * [Migration guide](docs/migrate-to-3-x) - Migrate to WinSW 3.x. * Configuration: - * [Main XML configuration file](docs/xml-config-file.md) - * [EXE configuration file](docs/exe-config-file.md) + * [XML configuration file](docs/xml-config-file.md) * [Logging and error reporting](docs/logging-and-error-reporting.md) * [Extensions](docs/extensions/extensions.md) * Use-cases: From b36a20de64c8e1471fb201a674ab610323dfa9d9 Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:33:39 +0800 Subject: [PATCH 02/18] Remove `` and `` --- samples/sample-complete.xml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/samples/sample-complete.xml b/samples/sample-complete.xml index eccbe9a4..ea2189ce 100644 --- a/samples/sample-complete.xml +++ b/samples/sample-complete.xml @@ -179,23 +179,6 @@ SECTION: Service management W32Time --> - - 15 sec - - - 1 sec - + %BASE%\myExecutable.exe From 0aaaeab23d3b360d64b2548dd7fe90753bc68a1f Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Sun, 26 Jul 2020 12:04:49 +0800 Subject: [PATCH 09/18] WIP Add extra steps --- docs/xml-config-file.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/xml-config-file.md b/docs/xml-config-file.md index d6e34b75..37420b9b 100644 --- a/docs/xml-config-file.md +++ b/docs/xml-config-file.md @@ -123,6 +123,22 @@ When you use the ``/``, you must use `stop ``` +### Extra steps + +```xml + + + + +``` + +| Untitled | Untitled | +| -------- | -------- | +| Pre-start | starting | +| Post-start | running | +| Pre-stop | stopping | +| Post-stop | stopping | + ### stoptimeout When the service is requested to stop, winsw first attempts to send a Ctrl+C signal, From 0ac6581ec361bf93b58e3122673c3e1effd4da51 Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Mon, 27 Jul 2020 09:47:14 +0800 Subject: [PATCH 10/18] Split removals --- docs/migrate-to-3-x.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/migrate-to-3-x.md b/docs/migrate-to-3-x.md index 0bc37794..bd2a5b35 100644 --- a/docs/migrate-to-3-x.md +++ b/docs/migrate-to-3-x.md @@ -9,4 +9,5 @@ TODO 1. Remove ``. 1. Merge `DomainName` and `UserName` into `DomainName\UserName`. If the user account belongs to the built-in domain, you can specify `.\UserName`. - Consider removing `` from config file and using `` in interactive context. -1. Remove `` and ``. +1. Remove ``. +1. Remove ``. From e110eb654b294320790ee2a035e06d709c504d2d Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Mon, 27 Jul 2020 10:01:20 +0800 Subject: [PATCH 11/18] Update additional commands --- docs/xml-config-file.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/xml-config-file.md b/docs/xml-config-file.md index 37420b9b..d8e8532e 100644 --- a/docs/xml-config-file.md +++ b/docs/xml-config-file.md @@ -123,7 +123,7 @@ When you use the ``/``, you must use `stop ``` -### Extra steps +### Additional commands ```xml @@ -132,12 +132,13 @@ When you use the ``/``, you must use ` ``` -| Untitled | Untitled | -| -------- | -------- | -| Pre-start | starting | -| Post-start | running | -| Pre-stop | stopping | -| Post-stop | stopping | +The pre-start command is executed when the service is starting and before the main process is started. + +The post-start command is executed when the service is running and after the main process is started. + +The pre-stop command is executed when the service is stopping and before the main process is stopped. + +The post-stop command is executed when the service is stopping and after the main process is stopped. ### stoptimeout From 371a62d07e92d5164c45f2a3ee2bb7f5a0011025 Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Mon, 27 Jul 2020 10:13:42 +0800 Subject: [PATCH 12/18] Update cli-commands.md --- docs/cli-commands.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/cli-commands.md b/docs/cli-commands.md index 584e3420..08632eae 100644 --- a/docs/cli-commands.md +++ b/docs/cli-commands.md @@ -1,5 +1,14 @@ # CLI commands +- [install](#install-command) +- [uninstall](#uninstall-command) +- [start](#start-command) +- [stop](#stop-command) +- [restart](#restart-command) +- [status](#status-command) +- [test](#test-command) +- [refresh](#refresh-command) + ## `install` command Installs the service. @@ -184,3 +193,26 @@ If a file isn't specified, WinSW searches the executable directory for a *.xml* Ignores keystrokes. If specified, WinSW waits for Ctrl+C. + +## `refresh` command + +Refreshes the service properties without reinstallation. + +### Usage + +``` +winsw refresh [] [--no-elevate] +``` + +### Arguments + +`path-to-config` + +The path to the configuration file. +If a file isn't specified, WinSW searches the executable directory for a *.xml* file with the same file name without the extension. + +### Options + +- `--no-elevate` + + Doesn't automatically trigger a UAC prompt. From 679ccf28f82ceecb99296182529546e089284a94 Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Mon, 27 Jul 2020 10:33:46 +0800 Subject: [PATCH 13/18] Update README.md --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8657c713..3531d865 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,7 @@ See the [project manifest](MANIFEST.md). ## Supported platforms -WinSW offers executables for .NET Framework 2.0, 4.0 and 4.6.1. -It can run on Windows platforms which have these versions of .NET Framework installed. +WinSW 3 can run on Windows platforms with .NET Framework 4.6.1 or later versions installed. For systems without .NET Framework, the project provides native 64-bit and 32-bit executables based on .NET Core. More executables can be added upon request. @@ -44,13 +43,14 @@ Your renamed *WinSW.exe* binary also accepts the following commands: | Command | Description | | ----------- | ----------- | -| [`install`](docs/cli-commands.md#install-command) | Installs the service. This command requires some preliminary steps described in the [Installation guide](docs/installation.md). | -| [`uninstall`](docs/cli-commands.md#uninstall-command) | Uninstalls the service. | -| [`start`](docs/cli-commands.md#start-command) | Starts the service. | -| [`stop`](docs/cli-commands.md#stop-command) | Stops the service. | -| [`restart`](docs/cli-commands.md#restart-command) | Stops and then starts the service. | -| [`status`](docs/cli-commands.md#status-command) | Checks the status of the service. | -| [`test`](docs/cli-commands.md#test-command) | Checks if the service can be started and then stopped without installation. | +| [install](docs/cli-commands.md#install-command) | Installs the service. This command requires some preliminary steps described in the [installation guide](docs/installation.md). | +| [uninstall](docs/cli-commands.md#uninstall-command) | Uninstalls the service. | +| [start](docs/cli-commands.md#start-command) | Starts the service. | +| [stop](docs/cli-commands.md#stop-command) | Stops the service. | +| [restart](docs/cli-commands.md#restart-command) | Stops and then starts the service. | +| [status](docs/cli-commands.md#status-command) | Checks the status of the service. | +| [test](docs/cli-commands.md#test-command) | Checks if the service can be started and then stopped without installation. | +| [refresh](docs/cli-commands.md#refresh-command) | Refreshes the service properties without reinstallation. | Most commands require Administrator privileges to execute. Since 2.8, WinSW will prompt for UAC in non-elevated sessions. @@ -58,7 +58,7 @@ Most commands require Administrator privileges to execute. Since 2.8, WinSW will User documentation: -* [Installation guide](docs/installation.md) - Describes the installation process for different systems and .NET versions +* [Installation guide](docs/installation.md) - Describes the installation process. * [Migration guide](docs/migrate-to-3-x) - Migrate to WinSW 3.x. * Configuration: * [XML configuration file](docs/xml-config-file.md) @@ -75,7 +75,6 @@ Developer documentation: ## Contributing Contributions are welcome! -No Contributor License Agreement is needed, just submit your pull requests. See the [contributing guidelines](CONTRIBUTING.md) for more information. ## License From 416dedfd25be39222bf442dcabcad190ffecd1e5 Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Mon, 27 Jul 2020 10:48:51 +0800 Subject: [PATCH 14/18] Update README.md --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3531d865..efbe69ad 100644 --- a/README.md +++ b/README.md @@ -56,22 +56,17 @@ Most commands require Administrator privileges to execute. Since 2.8, WinSW will ## Documentation -User documentation: - -* [Installation guide](docs/installation.md) - Describes the installation process. -* [Migration guide](docs/migrate-to-3-x) - Migrate to WinSW 3.x. +* [Get started](docs/installation.md) +* [Migrate to WinSW 3.x](docs/migrate-to-3-x) * Configuration: * [XML configuration file](docs/xml-config-file.md) * [Logging and error reporting](docs/logging-and-error-reporting.md) * [Extensions](docs/extensions/extensions.md) -* Use-cases: + * [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) -Developer documentation: - -* [Developer guide](docs/developer) - ## Contributing Contributions are welcome! From b0d79b901187f3c2b1f7826f2af7e8cba30ccb3c Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Mon, 27 Jul 2020 14:03:31 +0800 Subject: [PATCH 15/18] NOTE --- docs/cli-commands.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/cli-commands.md b/docs/cli-commands.md index 08632eae..55f0ee62 100644 --- a/docs/cli-commands.md +++ b/docs/cli-commands.md @@ -1,3 +1,5 @@ + + # CLI commands - [install](#install-command) From 1d36eb516ee6b9c36d29b99adb69766dd147cb1a Mon Sep 17 00:00:00 2001 From: NextTurn <45985406+NextTurn@users.noreply.github.com> Date: Mon, 27 Jul 2020 00:00:00 +0800 Subject: [PATCH 16/18] Update copyright texts --- LICENSE.txt | 2 +- WinSW.nuspec | 2 +- samples/sample-complete.xml | 32 +++++++++++++++++++------------- samples/sample-minimal.xml | 32 +++++++++++++++++++------------- src/WinSW/WinSW.csproj | 2 +- 5 files changed, 41 insertions(+), 29 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 8a41c032..59ea54d7 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) Kohsuke Kawaguchi, Sun Microsystems, Inc., CloudBees, Inc., Oleg Nenashev and other contributors +Copyright (c) 2008-2020 Kohsuke Kawaguchi, Sun Microsystems, Inc., CloudBees, Inc., Oleg Nenashev and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/WinSW.nuspec b/WinSW.nuspec index e275b101..b781840e 100644 --- a/WinSW.nuspec +++ b/WinSW.nuspec @@ -17,7 +17,7 @@ More info about the wrapper is available in the projects GitHub repository. MIT https://github.com/winsw/winsw - Copyright (c) 2010-2016 Kohsuke Kawaguchi, Sun Microsystems, Inc., CloudBees, Inc., Oleg Nenashev and other contributors + Copyright (c) 2008-2020 Kohsuke Kawaguchi, Sun Microsystems, Inc., CloudBees, Inc., Oleg Nenashev and other contributors false service wrapper diff --git a/samples/sample-complete.xml b/samples/sample-complete.xml index ea2189ce..ec36cd37 100644 --- a/samples/sample-complete.xml +++ b/samples/sample-complete.xml @@ -1,20 +1,26 @@