TerryPurdue (talk | contribs) (Created page with "== Stop Running Bot == $ sudo supervisorctl stop communitybot-discord == Download New Code == $ sudo su communitybot $ cd ~/CommunityBot $ git pull == Build New Releas...") |
TerryPurdue (talk | contribs) No edit summary |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== | == Restart Bot == | ||
$ whoami | |||
[your user account with sudo privileges] | |||
$ sudo supervisorctl restart communitybot-discord | |||
communitybot-discord: stopped | |||
communitybot-discord: started | |||
$ sudo supervisorctl status communitybot-discord | |||
communitybot-discord RUNNING pid 32690, uptime 0:00:27 | |||
== Update Bot == | |||
=== Stop Bot === | |||
$ whoami | |||
[your user account with sudo privileges] | |||
$ sudo supervisorctl stop communitybot-discord | $ sudo supervisorctl stop communitybot-discord | ||
$ sudo supervisorctl status communitybot-discord | |||
communitybot-discord STOPPED Sep 26 07:32 PM | |||
== Download New Code == | === Download New Code === | ||
$ sudo su communitybot | $ sudo su communitybot | ||
$ whoami | |||
communitybot | |||
$ cd ~/CommunityBot | $ cd ~/CommunityBot | ||
$ pwd | |||
/home/communitybot/CommunityBot | |||
$ git pull | $ git pull | ||
remote: Counting objects: 10, done. | |||
remote: Compressing objects: 100% (8/8), done. | |||
remote: Total 10 (delta 5), reused 5 (delta 0) | |||
Unpacking objects: 100% (10/10), done. | |||
From gitlab.com:SixbucksSolutions/CommunityBot | |||
4319f99..fea7bf8 master -> origin/master | |||
Updating 4319f99..fea7bf8 | |||
Fast-forward | |||
src/WazeBotDiscord/Modules/ReloadModule.cs | 5 ++- | |||
src/WazeBotDiscord/Modules/ScriptsModule.cs | 85 +++++++++++++++++++++++++++++++++++++++ | |||
src/WazeBotDiscord/Program.cs | 6 ++- | |||
src/WazeBotDiscord/Scripts/ScriptsService.cs | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |||
4 files changed, 241 insertions(+), 2 deletions(-) | |||
create mode 100644 src/WazeBotDiscord/Modules/ScriptsModule.cs | |||
create mode 100644 src/WazeBotDiscord/Scripts/ScriptsService.cs | |||
== Build New Release Code == | === Build New Release Code === | ||
$ cd src/WazeBotDiscord | $ cd src/WazeBotDiscord | ||
$ pwd | |||
/home/communitybot/CommunityBot/src/WazeBotDiscord | |||
$ dotnet build -c Release | $ dotnet build -c Release | ||
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core | Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core | ||
Copyright (C) Microsoft Corporation. All rights reserved. | Copyright (C) Microsoft Corporation. All rights reserved. | ||
WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll | WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll | ||
Build succeeded. | Build succeeded. | ||
0 Warning(s) | 0 Warning(s) | ||
0 Error(s) | 0 Error(s) | ||
Time Elapsed 00:00:02.66 | Time Elapsed 00:00:02.66 | ||
=== Publish New Release Code === | |||
$ dotnet publish -c Release | |||
<code>publish</code> creates a standalone directory where the build can be run from | |||
$ dotnet publish -c Release | |||
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core | Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core | ||
Copyright (C) Microsoft Corporation. All rights reserved. | Copyright (C) Microsoft Corporation. All rights reserved. | ||
WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll | WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll | ||
WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/publish/ | WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/publish/ | ||
$ | |||
=== Start Bot === | |||
$ exit | |||
$ whoami | |||
[your user account with sudo privileges] | |||
$ sudo supervisorctl start communitybot-discord | |||
$ sudo supervisorctl status communitybot-discord | |||
communitybot-discord RUNNING pid 24621, uptime 0:00:04 |
Latest revision as of 15:12, 10 October 2017
Restart Bot
$ whoami [your user account with sudo privileges] $ sudo supervisorctl restart communitybot-discord communitybot-discord: stopped communitybot-discord: started $ sudo supervisorctl status communitybot-discord communitybot-discord RUNNING pid 32690, uptime 0:00:27
Update Bot
Stop Bot
$ whoami [your user account with sudo privileges] $ sudo supervisorctl stop communitybot-discord $ sudo supervisorctl status communitybot-discord communitybot-discord STOPPED Sep 26 07:32 PM
Download New Code
$ sudo su communitybot $ whoami communitybot $ cd ~/CommunityBot $ pwd /home/communitybot/CommunityBot $ git pull remote: Counting objects: 10, done. remote: Compressing objects: 100% (8/8), done. remote: Total 10 (delta 5), reused 5 (delta 0) Unpacking objects: 100% (10/10), done. From gitlab.com:SixbucksSolutions/CommunityBot 4319f99..fea7bf8 master -> origin/master Updating 4319f99..fea7bf8 Fast-forward src/WazeBotDiscord/Modules/ReloadModule.cs | 5 ++- src/WazeBotDiscord/Modules/ScriptsModule.cs | 85 +++++++++++++++++++++++++++++++++++++++ src/WazeBotDiscord/Program.cs | 6 ++- src/WazeBotDiscord/Scripts/ScriptsService.cs | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 241 insertions(+), 2 deletions(-) create mode 100644 src/WazeBotDiscord/Modules/ScriptsModule.cs create mode 100644 src/WazeBotDiscord/Scripts/ScriptsService.cs
Build New Release Code
$ cd src/WazeBotDiscord $ pwd /home/communitybot/CommunityBot/src/WazeBotDiscord $ dotnet build -c Release Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved. WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:02.66
Publish New Release Code
publish
creates a standalone directory where the build can be run from
$ dotnet publish -c Release Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved. WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/publish/
Start Bot
$ exit $ whoami [your user account with sudo privileges] $ sudo supervisorctl start communitybot-discord $ sudo supervisorctl status communitybot-discord communitybot-discord RUNNING pid 24621, uptime 0:00:04