-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New CLI #547
base: v3
Are you sure you want to change the base?
New CLI #547
Conversation
When user not specified a command explicitly in CMD, WinSW autoatically call default command. ConsoleMode and ServiceMode is decide by default command. If command is default WinSW in Service Mode and if comand is not the default command WinSW is in Console Mode
Add abstract Run method to CliOption and implement in all subclasses of CliOption class Decouple install command from program Add install command to InstallOption Remove unnessacary methods from Program class Switch not completetly removed and after decoupling all commands switch will be removed.
Remove Uninstall command from Program class and add to UninstallOption class
Remove Start logic from Program class and add to StartOption class.
Remove Stop comand logics from Program class and add to StopOption class
Refactor DoRestart class name into RestartSelf
Created static CliOption object in Program
CliOption changed into CLICommand
Add mistakenly removed net40 support.
Remove StopWait and TestWait commands and implment as wait option to respect command.
GetCustomAttribute<VerbAttribute> is not net40 support. Update Loadverbs to net40 support and could be removed in V3
Update logics for invalid command. Previously it was not possible to parse both invalid command and 0 commands.
IIUC it would be better to re-target this pull request towards v3 |
I thought this was for v2? |
Well, we still have an issue with .NET Framework 2.0 support and incompatible CLI changes here. Moving it to v3 would resolve these concerns alltogether |
Can winsw be installed globally in PATH on the system and used as a CLI to install multiple services? |
Yes. But you need to have a separate configuration file for each service that you going to install and after this New CLI feature released then you can specify the configuration file explicitly in the command line interface. Until that, your configuration file should be located in the same directory where WinSW executable is located or in an ancestor directory. That means technically until this gets released you have to manually manage configuration files by renaming or save in a separate folder. Hope this helps! |
Windows Service Wrapper will update for YAML Configuration support as a part o GSoC 2020. So user need to to explicitly specify the configuration file on startup. Old CLI was in only commands manner and new CLI update to Commands and Options manner. User can specify config file, skip schema validation etc with WinSW commands such as install, start etc.