update docker file and tweak services
This commit is contained in:
parent
d73b972913
commit
22cc7e8b88
14 changed files with 32 additions and 14 deletions
|
|
@ -47,14 +47,7 @@ ENV Basic_BotUserName='' \
|
||||||
Setting_LogCommands='false' \
|
Setting_LogCommands='false' \
|
||||||
Agent_Channel='auto' \
|
Agent_Channel='auto' \
|
||||||
Agent_Version='auto' \
|
Agent_Version='auto' \
|
||||||
OBJECT_CHAT='false' \
|
OBJECT_CHAT='false'
|
||||||
SQLDB_Enabled='false' \
|
|
||||||
SQLDB_Host='127.0.0.1' \
|
|
||||||
SQLDB_Port='3306' \
|
|
||||||
SQLDB_Username='' \
|
|
||||||
SQLDB_Password='' \
|
|
||||||
SQLDB_Timeout='3' \
|
|
||||||
SQLDB_Database='secondbot'
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
ENV ASPNETCORE_URLS http://+:80
|
ENV ASPNETCORE_URLS http://+:80
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ namespace OpenMetaverse
|
||||||
/// You will get no output on the console. This behavior can be overriden by creating
|
/// You will get no output on the console. This behavior can be overriden by creating
|
||||||
/// a logger configuration file for log4net
|
/// a logger configuration file for log4net
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Helpers.LogLevel LOG_LEVEL = Helpers.LogLevel.Debug;
|
public static Helpers.LogLevel LOG_LEVEL = Helpers.LogLevel.None;
|
||||||
|
|
||||||
/// <summary>Attach avatar names to log messages</summary>
|
/// <summary>Attach avatar names to log messages</summary>
|
||||||
public bool LOG_NAMES = true;
|
public bool LOG_NAMES = true;
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
public override void Start()
|
public override void Start()
|
||||||
{
|
{
|
||||||
|
running = true;
|
||||||
Console.WriteLine("Client service [Starting]");
|
Console.WriteLine("Client service [Starting]");
|
||||||
AutoRestartLoginTimer = new Timer();
|
AutoRestartLoginTimer = new Timer();
|
||||||
AutoRestartLoginTimer.Interval = 30 * 1000;
|
AutoRestartLoginTimer.Interval = 30 * 1000;
|
||||||
|
|
@ -43,6 +44,7 @@ namespace SecondBotEvents.Services
|
||||||
}
|
}
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
AutoRestartLoginTimer.Stop();
|
AutoRestartLoginTimer.Stop();
|
||||||
Console.WriteLine("Client service [Stopping]");
|
Console.WriteLine("Client service [Stopping]");
|
||||||
ResetClient();
|
ResetClient();
|
||||||
|
|
|
||||||
|
|
@ -68,11 +68,13 @@ namespace SecondBotEvents.Services
|
||||||
}
|
}
|
||||||
public override void Start()
|
public override void Start()
|
||||||
{
|
{
|
||||||
|
running = true;
|
||||||
master.BotClientNoticeEvent += BotClientRestart;
|
master.BotClientNoticeEvent += BotClientRestart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
acceptNewCommands = false;
|
acceptNewCommands = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,12 +104,13 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
public override void Start()
|
public override void Start()
|
||||||
{
|
{
|
||||||
Stop();
|
running = true;
|
||||||
master.BotClientNoticeEvent += BotClientRestart;
|
master.BotClientNoticeEvent += BotClientRestart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
master.BotClientNoticeEvent -= BotClientRestart;
|
master.BotClientNoticeEvent -= BotClientRestart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1043,12 +1043,14 @@ namespace SecondBotEvents.Services
|
||||||
public override void Start()
|
public override void Start()
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
running = true;
|
||||||
master.BotClientNoticeEvent += BotClientRestart;
|
master.BotClientNoticeEvent += BotClientRestart;
|
||||||
Console.WriteLine("DataStore Service [Starting]");
|
Console.WriteLine("DataStore Service [Starting]");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
Reset();
|
Reset();
|
||||||
master.BotClientNoticeEvent -= BotClientRestart;
|
master.BotClientNoticeEvent -= BotClientRestart;
|
||||||
if (master.BotClient != null)
|
if (master.BotClient != null)
|
||||||
|
|
|
||||||
|
|
@ -220,11 +220,13 @@ namespace SecondBotEvents.Services
|
||||||
public override void Start()
|
public override void Start()
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
running = true;
|
||||||
master.BotClientNoticeEvent += BotClientRestart;
|
master.BotClientNoticeEvent += BotClientRestart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
master.BotClientNoticeEvent -= BotClientRestart;
|
master.BotClientNoticeEvent -= BotClientRestart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -404,7 +404,8 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
public override void Start()
|
public override void Start()
|
||||||
{
|
{
|
||||||
if(myConfig.GetEnabled() == false)
|
running = true;
|
||||||
|
if (myConfig.GetEnabled() == false)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Discord service [Disabled]");
|
Console.WriteLine("Discord service [Disabled]");
|
||||||
return;
|
return;
|
||||||
|
|
@ -431,6 +432,7 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
Console.WriteLine("Discord service [Stopping]");
|
Console.WriteLine("Discord service [Stopping]");
|
||||||
master.BotClientNoticeEvent -= BotClientRestart;
|
master.BotClientNoticeEvent -= BotClientRestart;
|
||||||
master.SystemStatusMessagesEvent -= SystemStatusEvent;
|
master.SystemStatusMessagesEvent -= SystemStatusEvent;
|
||||||
|
|
|
||||||
|
|
@ -344,6 +344,7 @@ namespace SecondBotEvents.Services
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Stop();
|
Stop();
|
||||||
|
running = true;
|
||||||
master.BotClientNoticeEvent += BotClientRestart;
|
master.BotClientNoticeEvent += BotClientRestart;
|
||||||
master.SystemStatusMessagesEvent += BotStatusMessage;
|
master.SystemStatusMessagesEvent += BotStatusMessage;
|
||||||
}
|
}
|
||||||
|
|
@ -354,6 +355,7 @@ namespace SecondBotEvents.Services
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
running = false;
|
||||||
master.BotClientNoticeEvent -= BotClientRestart;
|
master.BotClientNoticeEvent -= BotClientRestart;
|
||||||
master.SystemStatusMessagesEvent -= BotStatusMessage;
|
master.SystemStatusMessagesEvent -= BotStatusMessage;
|
||||||
removeEvents();
|
removeEvents();
|
||||||
|
|
|
||||||
|
|
@ -267,12 +267,14 @@ namespace SecondBotEvents.Services
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Stop();
|
Stop();
|
||||||
|
running = true;
|
||||||
master.BotClientNoticeEvent += BotClientRestart;
|
master.BotClientNoticeEvent += BotClientRestart;
|
||||||
Console.WriteLine("Homebound Service [Starting]");
|
Console.WriteLine("Homebound Service [Starting]");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
master.BotClientNoticeEvent -= BotClientRestart;
|
master.BotClientNoticeEvent -= BotClientRestart;
|
||||||
if (master.BotClient != null)
|
if (master.BotClient != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,13 @@ namespace SecondBotEvents.Services
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Stop();
|
Stop();
|
||||||
|
running = true;
|
||||||
master.BotClientNoticeEvent += BotClientRestart;
|
master.BotClientNoticeEvent += BotClientRestart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
if (myConfig.GetEnabled() == false)
|
if (myConfig.GetEnabled() == false)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -190,12 +190,14 @@ namespace SecondBotEvents.Services
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Stop();
|
Stop();
|
||||||
|
running = true;
|
||||||
master.BotClientNoticeEvent += BotClientRestart;
|
master.BotClientNoticeEvent += BotClientRestart;
|
||||||
Console.WriteLine("Interaction Service [Starting]");
|
Console.WriteLine("Interaction Service [Starting]");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
if (myConfig.GetEnabled() == false)
|
if (myConfig.GetEnabled() == false)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -130,12 +130,14 @@ namespace SecondBotEvents.Services
|
||||||
public override void Start()
|
public override void Start()
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
running = true;
|
||||||
master.BotClientNoticeEvent += BotClientRestart;
|
master.BotClientNoticeEvent += BotClientRestart;
|
||||||
Console.WriteLine("Relay Service [Starting]");
|
Console.WriteLine("Relay Service [Starting]");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Stop()
|
public override void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
master.BotClientNoticeEvent -= BotClientRestart;
|
master.BotClientNoticeEvent -= BotClientRestart;
|
||||||
if (master.BotClient != null)
|
if (master.BotClient != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ namespace SecondBotEvents.Services
|
||||||
public abstract class BotServices
|
public abstract class BotServices
|
||||||
{
|
{
|
||||||
public EventsSecondBot master;
|
public EventsSecondBot master;
|
||||||
|
protected bool running = false;
|
||||||
public BotServices(EventsSecondBot setMaster)
|
public BotServices(EventsSecondBot setMaster)
|
||||||
{
|
{
|
||||||
master = setMaster;
|
master = setMaster;
|
||||||
|
|
@ -32,15 +33,18 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
public virtual void Start()
|
public virtual void Start()
|
||||||
{
|
{
|
||||||
|
running = true;
|
||||||
}
|
}
|
||||||
public virtual void Stop()
|
public virtual void Stop()
|
||||||
{
|
{
|
||||||
|
running = false;
|
||||||
}
|
}
|
||||||
public void Restart()
|
public void Restart()
|
||||||
|
{
|
||||||
|
if (running == true)
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
}
|
||||||
Start();
|
Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue