mirror of
https://github.com/bitwarden/server.git
synced 2025-02-01 23:31:41 +01:00
stub install
This commit is contained in:
parent
feea862872
commit
0f7963f79c
@ -14,6 +14,15 @@ namespace Bit.Setup
|
||||
|
||||
public void BuildForInstall()
|
||||
{
|
||||
if(_context.Stub)
|
||||
{
|
||||
_context.Config.Ssl = true;
|
||||
_context.Install.Trusted = true;
|
||||
_context.Install.SelfSignedCert = false;
|
||||
_context.Install.DiffieHellman = false;
|
||||
return;
|
||||
}
|
||||
|
||||
_context.Config.Ssl = _context.Config.SslManagedLetsEncrypt;
|
||||
|
||||
if(!_context.Config.Ssl)
|
||||
|
@ -12,6 +12,7 @@ namespace Bit.Setup
|
||||
|
||||
public string[] Args { get; set; }
|
||||
public bool Quiet { get; set; }
|
||||
public bool Stub { get; set; }
|
||||
public IDictionary<string, string> Parameters { get; set; }
|
||||
public string OutputDir { get; set; } = "/etc/bitwarden";
|
||||
public string HostOS { get; set; } = "win";
|
||||
|
@ -36,6 +36,11 @@ namespace Bit.Setup
|
||||
{
|
||||
_context.WebVersion = _context.Parameters["webv"];
|
||||
}
|
||||
if(_context.Parameters.ContainsKey("stub"))
|
||||
{
|
||||
_context.Stub = _context.Parameters["stub"] == "true" ||
|
||||
_context.Parameters["stub"] == "1";
|
||||
}
|
||||
|
||||
Helpers.WriteLine(_context);
|
||||
|
||||
@ -69,7 +74,12 @@ namespace Bit.Setup
|
||||
_context.Install.Domain = _context.Parameters["domain"].ToLowerInvariant();
|
||||
}
|
||||
|
||||
if(!ValidateInstallation())
|
||||
if(_context.Stub)
|
||||
{
|
||||
_context.Install.InstallationId = Guid.Empty;
|
||||
_context.Install.InstallationKey = "SECRET_INSTALLATION_KEY";
|
||||
}
|
||||
else if(!ValidateInstallation())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user