mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
🚸 update cdn url
This commit is contained in:
parent
351526b56f
commit
c694fc4259
@ -18,7 +18,7 @@
|
|||||||
- 国内加速:
|
- 国内加速:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L https://raw.staticdn.net/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
|
curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
|
||||||
sudo ./nezha.sh
|
sudo ./nezha.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ var (
|
|||||||
updateCh = make(chan struct{}, 0)
|
updateCh = make(chan struct{}, 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
const AGENT_UPGRADE = 55
|
const agentUpgrade = 55
|
||||||
|
|
||||||
func doSelfUpdate() {
|
func doSelfUpdate() {
|
||||||
defer func() {
|
defer func() {
|
||||||
@ -67,7 +67,7 @@ func doSelfUpdate() {
|
|||||||
log.Println("Current binary is the latest version", version)
|
log.Println("Current binary is the latest version", version)
|
||||||
} else {
|
} else {
|
||||||
log.Println("Successfully updated to version", latest.Version)
|
log.Println("Successfully updated to version", latest.Version)
|
||||||
os.Exit(AGENT_UPGRADE)
|
os.Exit(agentUpgrade)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ pre_check() {
|
|||||||
|
|
||||||
## server location
|
## server location
|
||||||
if curl -s api.myip.la/json | grep -q 'China'; then
|
if curl -s api.myip.la/json | grep -q 'China'; then
|
||||||
GITHUB_RAW_URL="raw.staticdn.net"
|
GITHUB_RAW_URL="raw.sevencdn.com"
|
||||||
GITHUB_URL="hub.fastgit.org"
|
GITHUB_URL="hub.fastgit.org"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user