Skip to content

Commit e7315fc

Browse files
authored
Merge pull request #11 from mlohstroh/Feature/deploy-scripts
Added startup script
2 parents b2b93b3 + 8ed68c1 commit e7315fc

5 files changed

Lines changed: 38 additions & 8 deletions

File tree

Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ static void Main(string[] args)
2323

2424
JabberClient.Instance.OnJabberConnected += async delegate ()
2525
{
26-
await JabberClient.Instance.JoinRoom("incursion_bot_testing@conference.goonfleet.com");
27-
// await JabberClient.Instance.JoinRoom("incursion-leadership@conference.goonfleet.com");
28-
// await JabberClient.Instance.JoinRoom("fcincursions@conference.goonfleet.com");
29-
// await JabberClient.Instance.JoinRoom("incursions@conference.goonfleet.com");
26+
//await JabberClient.Instance.JoinRoom("incursion_bot_testing@conference.goonfleet.com");
27+
await JabberClient.Instance.JoinRoom("incursion-leadership@conference.goonfleet.com");
28+
await JabberClient.Instance.JoinRoom("fcincursions@conference.goonfleet.com");
29+
await JabberClient.Instance.JoinRoom("incursions@conference.goonfleet.com");
3030
};
3131

3232
Commands.Register();

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ Documentation=https://github.com/mlohstroh/incursion-dotnet
5959
[Service]
6060
Type=simple
6161
62-
WorkingDirectory=/opt/incursion-bot
63-
ExecStart=dotnet /opt/incursion-bot/jabber.dll
62+
WorkingDirectory=/opt/incursion-bot/
63+
ExecStart=sh /opt/incursion-bot/image/scripts/launch
6464
6565
RestartSec=2
6666
Restart=on-failure

jabber.csproj

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>netcoreapp2.2</TargetFramework>
66
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
7+
<PackageProjectUrl>https://github.com/mlohstroh/incursion-dotnet</PackageProjectUrl>
8+
<RepositoryUrl>https://github.com/mlohstroh/incursion-dotnet</RepositoryUrl>
9+
<RepositoryType>Github</RepositoryType>
10+
<Authors>M Lohstroh, S Grant</Authors>
11+
<Company>Imperium Incursions</Company>
12+
<Product>XMMP Jabber Bot</Product>
713
</PropertyGroup>
814

915
<ItemGroup>
@@ -17,8 +23,11 @@
1723

1824
<ItemGroup>
1925
<None Update=".env">
26+
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
27+
</None>
28+
<None Update="scripts\launch">
2029
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
2130
</None>
2231
</ItemGroup>
23-
32+
2433
</Project>

jabber.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.28010.2050
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "jabber", "jabber.csproj", "{4779777F-CAD9-408F-8548-84455D9AA649}"
77
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "incursion-dotnet-publish", "..\incursion-dotnet-publish\incursion-dotnet-publish.csproj", "{688F3D38-5C9C-46FE-B31F-28BC9627FBCE}"
9+
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1012
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
1517
{4779777F-CAD9-408F-8548-84455D9AA649}.Debug|Any CPU.Build.0 = Debug|Any CPU
1618
{4779777F-CAD9-408F-8548-84455D9AA649}.Release|Any CPU.ActiveCfg = Release|Any CPU
1719
{4779777F-CAD9-408F-8548-84455D9AA649}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{688F3D38-5C9C-46FE-B31F-28BC9627FBCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{688F3D38-5C9C-46FE-B31F-28BC9627FBCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{688F3D38-5C9C-46FE-B31F-28BC9627FBCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{688F3D38-5C9C-46FE-B31F-28BC9627FBCE}.Release|Any CPU.Build.0 = Release|Any CPU
1824
EndGlobalSection
1925
GlobalSection(SolutionProperties) = preSolution
2026
HideSolutionNode = FALSE

scripts/launch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
#vars
4+
BASEDIR="/opt/incursion-bot/"
5+
RUNDIR="/opt/incursion-bot/run/"
6+
IMAGEDIR="/opt/incursion-bot/image/"
7+
EXECFILE="jabber.dll"
8+
9+
# Remove the content of the
10+
rm -rf $RUNDIR*
11+
mkdir $RUNDIR
12+
cp -r $IMAGEDIR* $RUNDIR
13+
cd $RUNDIR/publish
14+
15+
dotnet $EXECFILE

0 commit comments

Comments
 (0)