mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 01:28:13 -05:00
🔥 移除脱裤子放屁的 fetch.sh
This commit is contained in:
parent
e93d58d498
commit
b4d3e5aade
14
README.md
14
README.md
@ -22,21 +22,15 @@
|
|||||||
**推荐配置:** 安装前准备 _两个域名_,一个可以 **接入 CDN** 作为 _公开访问_,比如 (status.nai.ba);另外一个解析到面板服务器作为 Agent 连接 Dashboard 使用,**不能接入 CDN** 直接暴露面板主机 IP,比如(randomdashboard.nai.ba)。
|
**推荐配置:** 安装前准备 _两个域名_,一个可以 **接入 CDN** 作为 _公开访问_,比如 (status.nai.ba);另外一个解析到面板服务器作为 Agent 连接 Dashboard 使用,**不能接入 CDN** 直接暴露面板主机 IP,比如(randomdashboard.nai.ba)。
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -sSL https://raw.githubusercontent.com/naiba/nezha/master/script/fetch.sh | bash
|
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
|
||||||
sudo /opt/nezha/nezha.sh
|
sudo ./nezha.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
国内镜像加速:
|
国内镜像加速:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -sSL https://cdn.jsdelivr.net/gh/naiba/nezha@master/script/fetch.sh | CN=true bash
|
curl -L https://cdn.jsdelivr.net/gh/naiba/nezha@master/script/install.sh -o nezha.sh && chmod +x nezha.sh
|
||||||
CN=true sudo /opt/nezha/nezha.sh
|
CN=true sudo ./nezha.sh
|
||||||
```
|
|
||||||
|
|
||||||
再次运行仅需:
|
|
||||||
|
|
||||||
```
|
|
||||||
/opt/nezha/nezha.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
_\* 使用 WatchTower 可以自动更新面板,Windows 终端可以使用 nssm 配置自启动(见尾部教程)_
|
_\* 使用 WatchTower 可以自动更新面板,Windows 终端可以使用 nssm 配置自启动(见尾部教程)_
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
if [[ -z "${CN}" ]]; then
|
|
||||||
GITHUB_RAW_URL="raw.githubusercontent.com/naiba/nezha/master"
|
|
||||||
else
|
|
||||||
GITHUB_RAW_URL="cdn.jsdelivr.net/gh/naiba/nezha@master"
|
|
||||||
fi
|
|
||||||
mkdir -p /opt/nezha
|
|
||||||
chmod 777 /opt/nezha
|
|
||||||
curl -sSL https://${GITHUB_RAW_URL}/script/install.sh -o /opt/nezha/nezha.sh
|
|
||||||
chmod +x /opt/nezha/nezha.sh
|
|
@ -96,8 +96,6 @@ confirm() {
|
|||||||
update_script() {
|
update_script() {
|
||||||
echo -e "> 更新脚本"
|
echo -e "> 更新脚本"
|
||||||
|
|
||||||
mkdir -p $NZ_BASE_PATH
|
|
||||||
chmod 777 -R $NZ_BASE_PATH
|
|
||||||
curl -sL https://${GITHUB_RAW_URL}/script/install.sh -o /tmp/nezha.sh
|
curl -sL https://${GITHUB_RAW_URL}/script/install.sh -o /tmp/nezha.sh
|
||||||
new_version=$(cat /tmp/nezha.sh | grep "NZ_VERSION" | head -n 1 | awk -F "=" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
|
new_version=$(cat /tmp/nezha.sh | grep "NZ_VERSION" | head -n 1 | awk -F "=" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
|
||||||
if [ ! -n "$new_version" ]; then
|
if [ ! -n "$new_version" ]; then
|
||||||
@ -105,13 +103,12 @@ update_script () {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo -e "当前最新版本为: ${new_version}"
|
echo -e "当前最新版本为: ${new_version}"
|
||||||
mv -f /tmp/nezha.sh ${NZ_BASE_PATH}/nezha.sh && chmod a+x ${NZ_BASE_PATH}/nezha.sh
|
mv -f /tmp/nezha.sh ./nezha.sh && chmod a+x ./nezha.sh
|
||||||
|
|
||||||
echo -e "脚本获取成功,脚本固定位置为${NZ_BASE_PATH}/nezha.sh,请今后使用 ${NZ_BASE_PATH}/nezha.sh 运行脚本"
|
echo -e "3s后执行新脚本"
|
||||||
echo -e "10s后执行新脚本"
|
sleep 3s
|
||||||
sleep 10s
|
|
||||||
clear
|
clear
|
||||||
exec ${NZ_BASE_PATH}/nezha.sh
|
exec ./nezha.sh
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user