mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2024-11-09 22:24:06 -08:00
Merge pull request #15 from TheCommsChannel/pr/14
README.md updates and systemd file
This commit is contained in:
commit
a2cf31a93f
68
README.md
68
README.md
|
@ -7,7 +7,8 @@ This is the TC²-BBS system integrated with Meshtastic devices. The system allow
|
|||
## Setup
|
||||
|
||||
### Docker installation
|
||||
TC²-BBS Meshtastic is available on Docker Hub
|
||||
|
||||
If you're a Docker user, TC²-BBS Meshtastic is available on Docker Hub!
|
||||
|
||||
[![Docker HUB](https://icon-icons.com/downloadimage.php?id=151885&root=2530/PNG/128/&file=docker_button_icon_151885.png)](https://hub.docker.com/r/thealhu/tc2-bbs-mesh)
|
||||
|
||||
|
@ -22,6 +23,7 @@ TC²-BBS Meshtastic is available on Docker Hub
|
|||
1. Clone the repository:
|
||||
|
||||
```sh
|
||||
cd ~
|
||||
git clone https://github.com/TheCommsChannel/TC2-BBS-mesh.git
|
||||
cd TC2-BBS-mesh
|
||||
```
|
||||
|
@ -34,7 +36,6 @@ python -m venv venv
|
|||
|
||||
3. Activate the virtual environment:
|
||||
|
||||
|
||||
- On Windows:
|
||||
|
||||
```sh
|
||||
|
@ -56,8 +57,7 @@ pip install -r requirements.txt
|
|||
5. Set up the configuration in `config.ini`:
|
||||
|
||||
**[interface]**
|
||||
|
||||
If using `type = serial` and you have multiple devices connected, you will need to uncomment the `port =` line and enter in the port of your device.
|
||||
If using `type = serial` and you have multiple devices connected, you will need to uncomment the `port =` line and enter the port of your device.
|
||||
|
||||
Linux Example:
|
||||
`port = /dev/ttyUSB0`
|
||||
|
@ -65,16 +65,16 @@ pip install -r requirements.txt
|
|||
Windows Example:
|
||||
`port = COM3`
|
||||
|
||||
If using type = tcp you will need to uncomment the hostname = 192.168.x.x line and put in the IP address of your Meshtastic device
|
||||
If using type = tcp you will need to uncomment the hostname = 192.168.x.x line and put in the IP address of your Meshtastic device.
|
||||
|
||||
**[sync]**
|
||||
|
||||
Enter in a list of other BBS nodes you would like to sync messages and bulletins with. Separate each by comma and no spaces as shown in the example below.
|
||||
Enter a list of other BBS nodes you would like to sync messages and bulletins with. Separate each by comma and no spaces as shown in the example below.
|
||||
You can find the nodeID in the menu under `Radio Configuration > User` for each node, or use this script for getting nodedb data from a device:
|
||||
|
||||
[Meshtastic-Python-Examples/print-nodedb.py at main · pdxlocations/Meshtastic-Python-Examples (github.com)](https://github.com/pdxlocations/Meshtastic-Python-Examples/blob/main/print-nodedb.py)
|
||||
|
||||
Example Config:
|
||||
|
||||
```ini
|
||||
[interface]
|
||||
type = serial
|
||||
|
@ -90,11 +90,62 @@ bbs_nodes = !f53f4abc,!f3abc123
|
|||
Run the server with:
|
||||
|
||||
```sh
|
||||
python server.py
|
||||
python server.py```
|
||||
```
|
||||
|
||||
Be sure you've followed the Python virtual environment steps above and activated it before running.
|
||||
|
||||
## Automatically run at boot
|
||||
|
||||
If you would like to have the script automatically run at boot, follow the steps below:
|
||||
|
||||
1. **Edit the service file**
|
||||
|
||||
First, edit the mesh-bbs.service file using your preferred text editor. The 3 following lines in that file are what we need to edit:
|
||||
|
||||
```sh
|
||||
User=pi
|
||||
WorkingDirectory=/home/pi/TC2-BBS-mesh
|
||||
ExecStart=/home/pi/TC2-BBS-mesh/venv/bin/python3 /home/pi/TC2-BBS-mesh/server.py
|
||||
```
|
||||
|
||||
The file is currently setup for a user named 'pi' and assumes that the TC2-BBS-mesh directory is located in the home directory (which it should be if the earlier directions were followed)
|
||||
|
||||
We just need to replace the 4 parts that have "pi" in those 3 lines with your username.
|
||||
|
||||
2. **Configuring systemd**
|
||||
From the TC2-BBS-mesh directory, run the following commands:
|
||||
|
||||
```sh
|
||||
sudo cp mesh-bbs.service /etc/systemd/system/
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo systemctl enable mesh-bbs.service
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo systemctl start mesh-bbs.service
|
||||
```
|
||||
|
||||
The service should be started now and should start anytime your device is powered on or rebooted. You can check the status ofk the service by running the following command:
|
||||
|
||||
```sh
|
||||
sudo systemctl status mesh-bbs.service
|
||||
```
|
||||
|
||||
If you need to stop the service, you can run the following:
|
||||
|
||||
```sh
|
||||
sudo systemctl stop mesh-bbs.service
|
||||
```
|
||||
|
||||
If you make changes to the watchlist.txt file, you will need to restart the service with the following command:
|
||||
|
||||
```sh
|
||||
sudo systemctl restart mesh-bbs.service
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- **Mail System**: Send and receive mail messages.
|
||||
|
@ -113,7 +164,6 @@ A video of it in use is available on our YouTube channel:
|
|||
|
||||
[![TC²-BBS-Mesh](https://img.youtube.com/vi/d6LhY4HoimU/0.jpg)](https://www.youtube.com/watch?v=d6LhY4HoimU)
|
||||
|
||||
|
||||
## Thanks
|
||||
|
||||
Big thanks to [Meshtastic](https://github.com/meshtastic) and [pdxlocations](https://github.com/pdxlocations) for the great Python examples:
|
||||
|
|
14
mesh-bbs.service
Normal file
14
mesh-bbs.service
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=TC²-BBS Meshtastic Version
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=20
|
||||
User=pi
|
||||
WorkingDirectory=/home/pi/TC2-BBS-mesh
|
||||
ExecStart=/home/pi/TC2-BBS-mesh/venv/bin/python3 /home/pi/TC2-BBS-mesh/server.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue