Go to file
Buddhika Chathuranga 10d3a6113f
YAML Configurations Support (GSoC - 2020) (#543)
* Add ServiceDesciptorYaml.cs

* Add YamlConfigurations.cs
YmlDotNet library added

* Update YamlConfigurations.cs

* Add download configuration to YamlConfiguration

* Revert "Add download configuration to YamlConfiguration"

This reverts commit f150de13b0.

* Add  ServiceDescriptrYaml unit test
Update YamlConfigurations.

* Confid files seperated
Download class refactored
Unit test updated

* Change nullable attributes.

* Refactor IWinSWConfiguration and Logging settings propagation

* Update YamlConfigurations.cs

* Update configuration FailureActions

* Update Yaml Confifurations

* Update YAML Configuration

* Update yaml configurations

* Update Yaml Configurations

* Yaml Configuration refactored

* Refactored YamlConfigurations

* Update serviceaccount and log configs

* YAML_SC_ACTION method name channged

* Refacored Download class. Field names changed to PascalCase readonly

* Add seperate download class to YamlConfigurations and create and return List<Download>

* Created DefaultWinSWSettings singleton

* Refactor variable name

* Update StopExecutable

* Nullable references updated

* Null references updated

* Add sanity checks for yaml deserializing.

* Implement Log Defaults

* Call logdefaults in YAMLConfigurations

* Update defaults value of ServiceAccout

If serviceaccoutn is not specified default ServiceAccount object will be provided from the Defautls.

* Merge build.yml with master

* Update YamlSeriviceDescriptor

Remove invalid Name field from ServiceAccout
Add BaseName logics to defults
merge build.yml with master

* Update IWinSWConfiguration Support

Now can use any IWinSWConfiguration type instead of ServiceDescriptor. We can use both ServiceDescriptor or ServiceDescriptorYaml.

* Update LogMode unit test

* ServiceAccount configurations refactored

Get all ServiceAccount configuration into a single ServiceAccout class.

* Update default BasePath

* Resolve Merge conflicts

* Resolve Merge Conflicts

* Update YamlDownload configs

* Fix null reference issue in arguments

* Update ServiceAccount configs in XML ServiceDescriptor

* remove BOM header

* Update environment variable configurations

Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2020-07-21 18:57:27 +02:00
.config Setup code coverage 2020-07-11 19:57:02 +08:00
.github Disable Codedov commit status 2020-07-19 08:16:52 +08:00
doc Fix outdated tag (#548) 2020-06-23 10:15:03 +08:00
eng Setup code coverage 2020-07-11 19:57:02 +08:00
examples Fix outdated tag (#548) 2020-06-23 10:15:03 +08:00
src YAML Configurations Support (GSoC - 2020) (#543) 2020-07-21 18:57:27 +02:00
.gitignore Remove strong name signing 2020-04-16 12:19:59 +08:00
CHANGELOG.md Update documentation headers 2020-04-01 21:52:12 +08:00
CONTRIBUTING.md Fix typos 2020-05-28 23:26:33 +08:00
Directory.Build.props Standardize coding styles 2020-07-13 09:19:30 +08:00
Directory.Build.targets Remove dead codes 2020-04-13 09:44:26 +08:00
LICENSE.txt Update license for GitHub 2020-03-17 08:24:05 +08:00
MANIFEST.md Clean up documentation 2020-04-01 13:02:47 +08:00
README.md Merge pull request #341 from new-mikha/master 2020-05-10 23:18:45 +02:00
WinSW.nuspec Merge pull request #452 from winsw/nuget-dotnet-461 2020-03-25 11:09:05 +01:00

README.md

Windows Service Wrapper in less restrictive license

Github All Releases NuGet Build Status Gitter License

WinSW is an executable binary, which can be used to wrap and manage a custom process as a Windows service. Once you download the installation package, you can rename WinSW.exe to any name, e.g. MyService.exe.

Why?

See the project manifest.

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. For systems without .NET Framework, the project provides native 64-bit and 32-bit executables which are based on .NET Core 3.1.

More executables can be added upon request.

Download

WinSW binaries are available on GitHub Releases and NuGet.

Alternative sources:

Usage

WinSW is being managed by configuration files: Main XML configuration file and EXE configuration file.

Your renamed WinSW.exe binary also accepts the following commands:

  • install to install the service to Windows Service Controller. This command requires some preliminary steps described in the Installation guide.
  • uninstall to uninstall the service. The opposite operation of above.
  • start to start the service. The service must have already been installed.
  • stop to stop the service.
  • stopwait to stop the service and wait until it's actually stopped.
  • restart to restart the service. If the service is not currently running, this command acts like start.
  • status to check the current status of the service.
    • This command prints one line to the console.
      • NonExistent indicates the service is not currently installed
      • Started to indicate the service is currently running
      • Stopped to indicate that the service is installed but not currently running.

Most commands require Administrator privileges to execute. Since v2.8, WinSW will prompt for UAC in non-elevated sessions.

Documentation

User documentation:

Developer documentation:

Contributing

Contributions are welcome! No Contributor License Agreement is needed, just submit your pull requests. See the contributing guidelines for more information.

License

WinSW is licensed under the MIT license.