Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
zhaojh329 committed May 2, 2022
1 parent 978d87e commit 53d7676
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 92 deletions.
47 changes: 1 addition & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,7 @@

This is the server program of [rtty](https://github.com/zhaojh329/rtty)

# Usage
## download the pre-built release binary from [Release](https://github.com/zhaojh329/rttys/releases) page according to your os and arch or compile it by yourself.

git clone https://github.com/zhaojh329/rttys

cd ui
npm install
npm run build
cd ..

./build.sh linux amd64

## Authorization
## Authorization(optional)
### Token
Generate a token

Expand All @@ -46,39 +34,6 @@ Use token
You can enable mTLS by specifying device CA storage (valid file) in config file or from CLI (variable ssl-cacert).
Device(s) without valid CA in storage will be disconnected in TLS handshake.

## Running as a Linux service
Move the rttys binary into /usr/local/bin/

sudo mv rttys /usr/local/bin/

Copy the config file to /etc/rttys/

sudo mkdir /etc/rttys
sudo cp rttys.conf /etc/rttys/

Create a systemd unit file: /etc/systemd/system/rttys.service

[Unit]
Description=rttys
After=network.target

[Service]
ExecStart=/usr/local/bin/rttys run -c /etc/rttys/rttys.conf
TimeoutStopSec=5s

[Install]
WantedBy=multi-user.target

To start the service for the first time, do the usual systemctl dance:

sudo systemctl daemon-reload
sudo systemctl enable rttys
sudo systemctl start rttys

You can stop the service with:

sudo systemctl stop rttys

# Database Preparation
## Sqlite
sqlite://rttys.db
Expand Down
47 changes: 1 addition & 46 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,7 @@

这是[rtty](https://github.com/zhaojh329/rtty)的服务器程序。

# 如何使用
## [Release](https://github.com/zhaojh329/rttys/releases)页面下载编译好的二进制文件或者自己编译

git clone https://github.com/zhaojh329/rttys

cd ui
npm install
npm run build
cd ..

./build.sh linux amd64

## 认证
## 认证(可选)
### Token
生成一个 token

Expand All @@ -46,39 +34,6 @@
您可以在配置文件中指定设备 CA 存储(有效文件)或在 CLI 中指定设备 CA 存储(参数 ssl-cacert) 来启用 mTLS。
存储中没有有效 CA 的设备将在 TLS 握手中断开连接。

## 作为Linux服务运行
移动rttys可执行程序到/usr/local/bin/

sudo mv rttys /usr/local/bin/

拷贝配置文件到/etc/rttys/

sudo mkdir /etc/rttys
sudo cp rttys.conf /etc/rttys/

创建一个systemd单元文件: /etc/systemd/system/rttys.service

[Unit]
Description=rttys
After=network.target

[Service]
ExecStart=/usr/local/bin/rttys run -c /etc/rttys/rttys.conf
TimeoutStopSec=5s

[Install]
WantedBy=multi-user.target

要首次启动该服务,请执行通常的systemctl操作:

sudo systemctl daemon-reload
sudo systemctl enable rttys
sudo systemctl start rttys

您可以通过以下方式停止服务:

sudo systemctl stop rttys

# 数据库准备
## Sqlite
sqlite://rttys.db
Expand Down

0 comments on commit 53d7676

Please sign in to comment.