!minor fixed the webroot issue #1513

pull/1520/head
tidusjar 7 years ago
parent dd8f8493e1
commit e1ceb4c66e

@ -11,9 +11,10 @@ namespace Ombi.Store.Entities
public enum ConfigurationTypes public enum ConfigurationTypes
{ {
Url, Url = 1,
FanartTv, // 2 was used for Port before the beta
TheMovieDb, FanartTv = 3,
StoragePath TheMovieDb = 4,
StoragePath = 5
} }
} }

@ -26,12 +26,16 @@ namespace Ombi
.WithParsed(o => .WithParsed(o =>
{ {
host = o.Host; host = o.Host;
WebRoot = o.WebRoot; WebRoot = Path.Combine(o.WebRoot, "wwwroot");
storagePath = o.StoragePath; storagePath = o.StoragePath;
}); });
Console.WriteLine(HelpOutput(result)); Console.WriteLine(HelpOutput(result));
if (string.IsNullOrEmpty(WebRoot))
{
WebRoot = Path.Combine(WebHost.CreateDefaultBuilder().GetSetting("contentRoot"), "wwwroot");
}
UrlArgs = host; UrlArgs = host;
var urlValue = string.Empty; var urlValue = string.Empty;
@ -97,7 +101,9 @@ namespace Ombi
[Option('s', "storage", Required = false, HelpText = "Storage path, where we save the logs and database")] [Option('s', "storage", Required = false, HelpText = "Storage path, where we save the logs and database")]
public string StoragePath { get; set; } public string StoragePath { get; set; }
[Option('w', "webroot", Required = false, HelpText = "(Root Path for Reverse Proxies) If not specified, the default is \"(Content Root)/wwwroot\", if the path exists. If the path doesn\'t exist, then a no-op file provider is used.")] [Option('w', "webroot", Required = false,
HelpText = "(Root Path for Reverse Proxies) If not specified, the default is \"(Working Directory)\", if the path exists. If the path doesn\'t exist, then a no-op file provider is used."
,Default = "")]
public string WebRoot { get; set; } public string WebRoot { get; set; }
} }

Loading…
Cancel
Save