Skip to content

Commit

Permalink
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 Feb 24, 2020
1 parent 35a6e9a commit 8ee4a41
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 74 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,39 @@ This is the server program of [rtty](https://github.com/zhaojh329/rtty)

./rttys -token 34762d07637276694b938d23f10d7164

## 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 -conf /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

# Contributing
If you would like to help making [rttys](https://github.com/zhaojh329/rttys) better,
see the [CONTRIBUTING.md](https://github.com/zhaojh329/rttys/blob/master/CONTRIBUTING.md) file.
33 changes: 33 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,39 @@

./rttys -token 34762d07637276694b938d23f10d7164

## 作为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 -conf /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

# 贡献代码
如果你想帮助[rttys](https://github.com/zhaojh329/rttys)变得更好,请参考
[CONTRIBUTING_ZH.md](https://github.com/zhaojh329/rttys/blob/master/CONTRIBUTING_ZH.md)
15 changes: 0 additions & 15 deletions scripts/README

This file was deleted.

47 changes: 0 additions & 47 deletions scripts/rttys.init

This file was deleted.

12 changes: 0 additions & 12 deletions scripts/rttys.service

This file was deleted.

0 comments on commit 8ee4a41

Please sign in to comment.