Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Commit

Permalink
doc: Update readme for usage
Browse files Browse the repository at this point in the history
  • Loading branch information
myl7 committed Nov 8, 2021
1 parent 1b82501 commit 688f8c0
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,24 @@

## 部署

TODO
首先获取 `AUTHORIZATION` 参数,具体方法参见此文档尾部原 README 的介绍

### Docker

```
docker run -d --restart=always --name=vikacg-checkin -e AUTHORIZATION=... myl7/vikacg-checkin
```

每天东八区 17:00 签到。
如需更改时间可以修改 `crontab.txt` 之后重新用 `build.sh``docker build` 构建自己的 Docker image。

### systemd

将构建好的 `vikacg-checkin`(可以自行使用 `build.sh` 构建或是从 [Release](https://github.com/myl7/vikacg-checkin/releases) 下载)放到 `/usr/local/bin/vikacg-checkin`
然后将 `vikacg-checkin.service``vikacg-checkin.timer` 复制到 `/etc/systemd/system/`,并执行 `systemctl daemon-reload``systemctl enable vikacg-checkin.timer`
受益于 systemd timer,每天会在东八区 17:00 之后 3h 内的某一随机时刻签到。
如不需要随机时间签到,将 `vikacg-checkin.timer` 中的 `RandomizedDelaySec=3h` 一行删除并执行 `systemctl daemon-reload``systemctl restart vikacg-checkin.timer` 即可。
如需更改时间可以修改 `vikacg-checkin.timer` 中的 `OnCalendar` 并同上重启即可。

## License

Expand Down

0 comments on commit 688f8c0

Please sign in to comment.