mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
* DaemonWin32 : separate --service (boolean) from --svcctl (string) option
This commit is contained in:
parent
c5f6a690de
commit
36750ab900
@ -23,9 +23,10 @@ namespace i2p
|
|||||||
else
|
else
|
||||||
isDaemon = 0;
|
isDaemon = 0;
|
||||||
|
|
||||||
std::string serviceControl = i2p::util::config::GetArg("-service", "none");
|
std::string serviceControl = i2p::util::config::GetArg("-svcctl", "");
|
||||||
if (serviceControl == "install")
|
if (serviceControl == "install")
|
||||||
{
|
{
|
||||||
|
LogPrint(eLogInfo, "WinSVC: installing ", SERVICE_NAME, " as service");
|
||||||
InstallService(
|
InstallService(
|
||||||
SERVICE_NAME, // Name of service
|
SERVICE_NAME, // Name of service
|
||||||
SERVICE_DISPLAY_NAME, // Name to display
|
SERVICE_DISPLAY_NAME, // Name to display
|
||||||
@ -38,14 +39,10 @@ namespace i2p
|
|||||||
}
|
}
|
||||||
else if (serviceControl == "remove")
|
else if (serviceControl == "remove")
|
||||||
{
|
{
|
||||||
|
LogPrint(eLogInfo, "WinSVC: uninstalling ", SERVICE_NAME, " service");
|
||||||
UninstallService(SERVICE_NAME);
|
UninstallService(SERVICE_NAME);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
else if (serviceControl != "none")
|
|
||||||
{
|
|
||||||
printf(" --service=install to install the service.\n");
|
|
||||||
printf(" --service=remove to remove the service.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isDaemon == 1)
|
if (isDaemon == 1)
|
||||||
{
|
{
|
||||||
|
@ -12,6 +12,7 @@ Command line options
|
|||||||
* --loglevel= - Log messages above this level (debug, *info, warn, error)
|
* --loglevel= - Log messages above this level (debug, *info, warn, error)
|
||||||
* --pidfile= - Where to write pidfile (dont write by default)
|
* --pidfile= - Where to write pidfile (dont write by default)
|
||||||
* --daemon= - Enable or disable daemon mode. 1 for yes, 0 for no.
|
* --daemon= - Enable or disable daemon mode. 1 for yes, 0 for no.
|
||||||
|
* --svcctl= - Windows service management (--svcctl="install" or --svcctl="remove")
|
||||||
* --service= - 1 if uses system folders (/var/run/i2pd.pid, /var/log/i2pd.log, /var/lib/i2pd).
|
* --service= - 1 if uses system folders (/var/run/i2pd.pid, /var/log/i2pd.log, /var/lib/i2pd).
|
||||||
* --v6= - 1 if supports communication through ipv6, off by default
|
* --v6= - 1 if supports communication through ipv6, off by default
|
||||||
* --floodfill= - 1 if router is floodfill, off by default
|
* --floodfill= - 1 if router is floodfill, off by default
|
||||||
|
Loading…
x
Reference in New Issue
Block a user