public AzureDnsOptions(IOptionsService options, IInputService input) { TenantId = options.TryGetOption(options.Options.AzureTenantId, input, "Tenant Id"); ClientId = options.TryGetOption(options.Options.AzureClientId, input, "Client Id"); Secret = options.TryGetOption(options.Options.AzureSecret, input, "Secret", true); SubscriptionId = options.TryGetOption(options.Options.AzureSubscriptionId, input, "DNS Subscription ID"); ResourceGroupName = options.TryGetOption(options.Options.AzureResourceGroupName, input, "DNS Resoure Group Name"); }
public DnsScriptOptions(IOptionsService options, IInputService input, ILogService log) { do { CreateScript = options.TryGetOption(options.Options.DnsCreateScript, input, "Path to script that creates DNS records. Parameters passed are the hostname, record name and token"); }while (!CreateScript.ValidFile(log)); do { DeleteScript = options.TryGetOption(options.Options.DnsDeleteScript, input, "Path to script that deletes DNS records. Parameters passed are the hostname and record name"); }while (!DeleteScript.ValidFile(log)); }
public override AzureOptions Aquire(Target target, IOptionsService options, IInputService input, RunLevel runLevel) { var az = options.GetArguments <AzureArguments>(); return(new AzureOptions() { TenantId = options.TryGetOption(az.AzureTenantId, input, "Tenant Id"), ClientId = options.TryGetOption(az.AzureClientId, input, "Client Id"), Secret = options.TryGetOption(az.AzureSecret, input, "Secret", true), SubscriptionId = options.TryGetOption(az.AzureSubscriptionId, input, "DNS Subscription ID"), ResourceGroupName = options.TryGetOption(az.AzureResourceGroupName, input, "DNS Resoure Group Name") }); }
public override ScriptOptions Aquire(Target target, IOptionsService options, IInputService input, RunLevel runLevel) { var args = options.GetArguments <ScriptArguments>(); var ret = new ScriptOptions(); do { ret.CreateScript = options.TryGetOption(args.DnsCreateScript, input, "Path to script that creates DNS records. Parameters passed are the hostname, record name and token"); }while (!ret.CreateScript.ValidFile(_log)); do { ret.DeleteScript = options.TryGetOption(args.DnsDeleteScript, input, "Path to script that deletes DNS records. Parameters passed are the hostname and record name"); }while (!ret.DeleteScript.ValidFile(_log)); return(ret); }
public override void Aquire(ScheduledRenewal renewal, IOptionsService optionsService, IInputService inputService, RunLevel runLevel) { inputService.Show("Full instructions", "https://github.com/Lone-Coder/letsencrypt-win-simple/wiki/Install-Script"); do { renewal.Script = optionsService.TryGetOption(optionsService.Options.Script, inputService, "Enter the path to the script that you want to run after renewal"); }while (!renewal.Script.ValidFile(_log)); inputService.Show("{0}", "Hostname"); inputService.Show("{1}", ".pfx password"); inputService.Show("{2}", ".pfx path"); inputService.Show("{3}", "Certificate store name"); inputService.Show("{4}", "Certificate friendly name"); inputService.Show("{5}", "Certificate thumbprint"); inputService.Show("{6}", "Central SSL store path"); renewal.ScriptParameters = optionsService.TryGetOption(optionsService.Options.ScriptParameters, inputService, "Enter the parameter format string for the script, e.g. \"--hostname {0}\""); }
/// <summary> /// Get webroot path manually /// </summary> public HttpValidationOptions <TPlugin> BaseAquire(Target target, IOptionsService options, IInputService input, RunLevel runLevel) { string path = null; var allowEmtpy = AllowEmtpy(target); path = options.TryGetOption(null, input, WebrootHint(allowEmtpy)); while ( (!string.IsNullOrEmpty(path) && !PathIsValid(path)) || (string.IsNullOrEmpty(path) && !allowEmtpy)) { path = options.TryGetOption(null, input, WebrootHint(allowEmtpy)); } return(new TOptions { Path = path, CopyWebConfig = target.IIS || input.PromptYesNo("Copy default web.config before validation?") }); }
public override DreamhostOptions Aquire(Target target, IOptionsService options, IInputService input, RunLevel runLevel) { var arguments = options.GetArguments <DreamhostArguments>(); return(new DreamhostOptions() { ApiKey = options.TryGetOption(arguments.ApiKey, input, "ApiKey", true), }); }
public override ScriptOptions Aquire(Target target, IOptionsService optionsService, IInputService inputService, RunLevel runLevel) { var ret = new ScriptOptions(); var args = optionsService.GetArguments <ScriptArguments>(); inputService.Show("Full instructions", "https://github.com/PKISharp/win-acme/wiki/Install-Script"); do { ret.Script = optionsService.TryGetOption(args.Script, inputService, "Enter the path to the script that you want to run after renewal"); }while (!ret.Script.ValidFile(_log)); inputService.Show("{0}", "Common name"); inputService.Show("{1}", ".pfx password"); inputService.Show("{2}", ".pfx path"); inputService.Show("{3}", "Store name"); inputService.Show("{4}", "Friendly name"); inputService.Show("{5}", "Certificate thumbprint"); ret.ScriptParameters = optionsService.TryGetOption(args.ScriptParameters, inputService, "Enter the parameter format string for the script, e.g. \"--hostname {0}\""); return(ret); }
/// <summary> /// Check or get information need for validation (interactive) /// </summary> /// <param name="target"></param> public override void Aquire(Target target, IOptionsService optionsService, IInputService inputService) { // Manual if (string.IsNullOrEmpty(target.WebRootPath)) { do { target.WebRootPath = optionsService.TryGetOption(optionsService.Options.WebRoot, inputService, WebrootHint()); }while (!ValidateWebroot(target)); } if (target.IIS == null) { target.IIS = optionsService.Options.ManualTargetIsIIS; if (target.IIS == false) { target.IIS = inputService.PromptYesNo("Copy default web.config before validation?"); } } }
public NetworkCredentialOptions(IOptionsService options, IInputService input) { UserName = options.TryGetOption(options.Options.UserName, input, "Username"); Password = options.TryGetOption(options.Options.Password, input, "Password", true); }