put all files
This commit is contained in:
16
README.md
16
README.md
@ -1,3 +1,17 @@
|
|||||||
# auto_village
|
# auto_village
|
||||||
|
|
||||||
Telegram 自動收穫工作 Script,請搭配 Telegram CLI 使用。
|
Telegram 自動收穫工作 Script,請搭配 Telegram CLI 使用。
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
1. 建立一個資料夾 `auto_village`,把 [`tg`](https://github.com/vysheng/tg) 編譯好登入進去。
|
||||||
|
|
||||||
|
2. `auto.sh` 放進去。
|
||||||
|
|
||||||
|
3. 把 `rc.local` 的內容放進 `/etc/rc.local` 之後打:
|
||||||
|
```sh
|
||||||
|
# 打開
|
||||||
|
sudo systemctl restart rc-local.service
|
||||||
|
# 關掉好像要用
|
||||||
|
sudo systemctl kill rc-local.service
|
||||||
|
```
|
9
auto.sh
Normal file
9
auto.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
sleep 3s
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
echo "dialog_list" | nc localhost 58787
|
||||||
|
echo "msg Village_Game /work" | nc localhost 58787
|
||||||
|
echo "msg Village_Game /harvest" | nc localhost 58787
|
||||||
|
sleep 720s
|
||||||
|
done
|
Reference in New Issue
Block a user