mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Fixed: Setup remote access for service during install
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
@@ -21,8 +21,12 @@ namespace NzbDrone.Common
|
||||
Console.WriteLine();
|
||||
Console.WriteLine(" Usage: {0} <command> ", Process.GetCurrentProcess().MainModule.ModuleName);
|
||||
Console.WriteLine(" Commands:");
|
||||
Console.WriteLine(" /{0} Install the application as a Windows Service ({1}).", StartupContext.INSTALL_SERVICE, ServiceProvider.SERVICE_NAME);
|
||||
Console.WriteLine(" /{0} Uninstall already installed Windows Service ({1}).", StartupContext.UNINSTALL_SERVICE, ServiceProvider.SERVICE_NAME);
|
||||
if (OsInfo.IsWindows)
|
||||
{
|
||||
Console.WriteLine(" /{0} Install the application as a Windows Service ({1}).", StartupContext.INSTALL_SERVICE, ServiceProvider.SERVICE_NAME);
|
||||
Console.WriteLine(" /{0} Uninstall already installed Windows Service ({1}).", StartupContext.UNINSTALL_SERVICE, ServiceProvider.SERVICE_NAME);
|
||||
Console.WriteLine(" /{0} Register URL and open firewall port (allows access from other devices on your network).", StartupContext.REGISTER_URL);
|
||||
}
|
||||
Console.WriteLine(" /{0} Don't open Lidarr in a browser", StartupContext.NO_BROWSER);
|
||||
Console.WriteLine(" /{0} Start Lidarr terminating any other instances", StartupContext.TERMINATE);
|
||||
Console.WriteLine(" /{0}=path Path to use as the AppData location (stores database, config, logs, etc)", StartupContext.APPDATA);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NzbDrone.Common.EnvironmentInfo
|
||||
{
|
||||
@@ -6,8 +6,10 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
{
|
||||
HashSet<string> Flags { get; }
|
||||
Dictionary<string, string> Args { get; }
|
||||
bool Help { get; }
|
||||
bool InstallService { get; }
|
||||
bool UninstallService { get; }
|
||||
bool RegisterUrl { get; }
|
||||
|
||||
string PreservedArguments { get; }
|
||||
}
|
||||
@@ -21,6 +23,7 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
public const string HELP = "?";
|
||||
public const string TERMINATE = "terminateexisting";
|
||||
public const string RESTART = "restart";
|
||||
public const string REGISTER_URL = "registerurl";
|
||||
|
||||
public StartupContext(params string[] args)
|
||||
{
|
||||
@@ -47,9 +50,10 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
public HashSet<string> Flags { get; private set; }
|
||||
public Dictionary<string, string> Args { get; private set; }
|
||||
|
||||
public bool Help => Flags.Contains(HELP);
|
||||
public bool InstallService => Flags.Contains(INSTALL_SERVICE);
|
||||
|
||||
public bool UninstallService => Flags.Contains(UNINSTALL_SERVICE);
|
||||
public bool RegisterUrl => Flags.Contains(REGISTER_URL);
|
||||
|
||||
public string PreservedArguments
|
||||
{
|
||||
@@ -71,4 +75,4 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user