mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 01:28:13 -05:00
🚸 agent: exit code
This commit is contained in:
parent
2ae832f509
commit
13e8ea76ed
@ -47,8 +47,6 @@ var (
|
|||||||
updateCh = make(chan struct{}, 0)
|
updateCh = make(chan struct{}, 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
const agentUpgrade = 55
|
|
||||||
|
|
||||||
func doSelfUpdate() {
|
func doSelfUpdate() {
|
||||||
defer func() {
|
defer func() {
|
||||||
time.Sleep(time.Minute * 20)
|
time.Sleep(time.Minute * 20)
|
||||||
@ -66,7 +64,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(agentUpgrade)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user