Skip to content

Commit

Permalink
Update README AND Add AutoUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
Erope committed Dec 29, 2021
1 parent bd9b818 commit 270130b
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-nezha.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
# Copyright (c) 2021-2022 zPonds <https://shinenet.cn>
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the GPL License.
# See /LICENSE for more information.
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/update-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# Copyright (c) 2021-2022 zPonds <https://shinenet.cn>
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/Erope/openwrt_nezha/
# Description: Build Nezha using GitHub Actions
#

name: Update Checker

env:
REPO_URL: https://github.com/naiba/nezha

on:
workflow_dispatch:
schedule:
- cron: 10 20 * * *

jobs:
check:
runs-on: ubuntu-latest

steps:

- name: Get Version
id: getVer
run: |
echo "::set-output name=Version::$(curl -m 10 -sL "https://api.github.com/repos/naiba/nezha/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')"
- name: Compare Version
id: cacheVer
uses: actions/cache@v2
with:
path: .savever
key: HEAD-${{ steps.getHash.outputs.Version }}

- name: Save New Version
if: steps.cacheHash.outputs.cache-hit != 'true'
run: |
echo ${{ steps.getHash.outputs.Version }} | tee .savever
- name: Trigger build
if: steps.cacheHash.outputs.cache-hit != 'true'
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ACTIONS_TRIGGER_PAT }}
event-type: Source Code Update

- name: Delete workflow runs
uses: GitRML/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 1
59 changes: 58 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
# openwrt_nezha

哪吒监控 For OpenWRT
*暂时仅支持lua版本*

**暂时仅支持lua版本**



## 简介

用于在旧版OpenWRT及LEDE中快捷添加Nezha客户端的项目,解决OpenWRT需要手动添加服务的问题。



## 用法

### 编译

`src-git nezha https://github.com/Erope/openwrt_nezha` 添加至 `feeds.conf.default` 后执行

./scripts/feeds update -a && ./scripts/feeds install -a

找到luci-app-nezha 选中后编译即可



## 安装IPK包

从Release中下载适合的包后自行安装(仅支持X64 X86和ARM64)



## 致谢

部分代码来自P3TERX <https://p3terx.com> 和 KFERMercer <[email protected]>

源项目为: <https://github.com/naiba/nezha>

非常感谢!



## Q/A

1. Q: 我的架构并非X64 X86和ARM64 可以安装吗?

A: 可以,请自行编译,但需要注意如果性能较弱或者内存过少,启动Nezha可能会严重消耗性能。

2. Q: 我想将其部署在工作压力较大的OpenWRT上,有什么需要注意的吗?

A: 需要注意Nezha默认会监控连接数,在连接数较多的情况下可能会影响性能。

3. Q: Agent会自动更新吗?

A: 会自动更新,因此未扩容的硬路由需要注意剩余空间是否足够。

4. Q: 我想更新Agent需要做什么吗?

A: 一般情况下Agent会自动更新,但本项目的版本号不会自动更新,虽然安装包会跟随Nezha源项目而更新。如若Agent有特殊情况长期未能正常更新,可以考虑删除包后重新安装。

0 comments on commit 270130b

Please sign in to comment.