Skip to content

Commit 6b80b9a

Browse files
authored
Update hosting.md
Made simple changes to the format and updated it to use DotNET 9.0. Signed-off-by: Kristalli <[email protected]>
1 parent f6404d7 commit 6b80b9a

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

Diff for: DisCatSharp.Docs/articles/misc/hosting.md

+13-15
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ If you don't have a PC or other gear sitting around, you may use your phone inst
3131
- A phone with Android 7 or higher (5+ is possible but, not recommended as it posses security issues).
3232
- Termux.
3333
- An internet connection.
34+
- Basic understanding of bash and nano.
3435

3536
#### Setup
3637

@@ -61,30 +62,27 @@ proot-distro login debian
6162
apt update -y && apt upgrade -y
6263
```
6364

64-
- Install git and wget.
65+
- Install Git and Wget.
6566
```sh
6667
apt install git wget -y
6768
```
6869

6970
- We get the DotNET script.
7071
```sh
71-
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && chmod +x ./dotnet-install.sh
72+
wget https://dot.net/v1/dotnet-install.sh -O dotnet.sh && chmod +x ./dotnet.sh
7273
```
7374

74-
- Now, we install the DotNET sdk and runtime.
75+
- Now, we install the DotNET SDK and runtime.
7576
```sh
76-
./dotnet-install.sh --channel 8.0
77+
./dotnet.sh --channel 9.0
7778
```
7879
>[!NOTE]
79-
> If the script doesn't automatically add `dotnet` to the path environment variable, run `export PATH=$PATH:$HOME/.dotnet` and add this command to the end of your `.bashrc` file which can be found in your user directory. To edit the `.bashrc` file run, `nano ~/.bashrc` and paste in the arguments. The `.bashrc` file is your configuration file for the bash shell environment.
80-
81-
>[!WARNING]
82-
> You might encounter the error code `0x8007000E` when you try to run the bot. To fix it, run `export DOTNET_GCHeapHardLimit=1C0000000` and also put that command into your `~/.bashrc` file.
83-
> You'll possibly also get hit with an error message about a "valid ICU package" to fix that, run `export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1` and run the bot again. Or simply add these lines to your `.csproj` file in your project folder:
84-
```xml
85-
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
80+
> Incase the script does not automatically add "dotnet" to path, add `export PATH=$PATH:$HOME/.dotnet` at the end of your `.bashrc` file. Simply, run `nano ~/.bashrc` and paste it in. After which run `source ~/.bashrc` to apply our changes.
81+
- When trying to run the bot later, we'll encounter errors such as "0x8007000E" and "valid ICU package". To migitage this, we'll add the following to our `.bashrc` as stated in the note.
82+
```sh
83+
export DOTNET_GCHeapHardLimit=1C0000000
84+
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
8685
```
87-
8886
##### Cloud Hosted Code
8987

9088
- If you have your code hosted with git or simply are able to download it, get the source code and `cd` into the directory. Example of a git repository on GitHub:
@@ -105,7 +103,7 @@ cd repo
105103
- Double click on `Phone` or what it is named, then simply copy your project folder from your pc and paste it in there. If you want to keep it in a custom path, remember the path to the project.
106104

107105
>[!NOTE]
108-
> Transferring of files might take a bit. Be sure to not interrupt the process by shutting down or disconnecting your phone
106+
> Transferring of files might take a bit. Be sure to not interrupt the process by shutting down or disconnecting your phone.
109107
110108
- First, we setup Termux storage run, `termux-setup-storage` and then it'll prompt you to give Termux access to your files and folders. Then run, `ls ~/storage/shared` to make sure you have access.
111109

@@ -117,7 +115,7 @@ cd repo
117115
>[!TIP]
118116
> If you don't have a `.bashrc` file in your $HOME, just run `nano $HOME/.bashrc`, save, and exit. Then run the source command again.
119117
120-
- Now, we'll move over the source code from our phone to the VM. Simply, run, `mv projectname/ $PROOTDISTROFS/debian/root/`.
118+
- Now, we'll move over the source code from our phone to the VM. Simply, run, `mv projectname/$PROOTDISTROFS/debian/root/`.
121119

122120
>[!WARNING]
123121
> Double-check file paths, as you might accidentally move the wrong files around.
@@ -131,7 +129,7 @@ cd repo
131129
132130
#### Profit
133131

134-
Bot should be working fine, given you follow appropriate steps. For support or any inquires you can join our discord.
132+
The bot should be working fine, given you follow appropriate steps. For support or any inquires you can join the [Discord](https://discord.com/invite/2HWta4GXus).
135133

136134
## Third-Party Hosting
137135

0 commit comments

Comments
 (0)