Report update progress and log to Hammerhead while updating
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
049b6bad97
commit
246b08c090
4 files changed
+50
-4
No files matched your search
@@ -55,7 +55,11 @@ func main() {
|
||||
Hammerhead: strings.TrimRight(*hh, "/"), Token: *token, TunnelAddr: *tun, DataDir: *data, Docker: *dockerOn,
|
||||
Traefik: blacktip.TraefikConfig{Path: *traefikPath, ACMEDNS: *acmeDNS, NoACME: *noACME},
|
||||
Version: version, AutoUpdate: *autoUpdate,
|
||||
UpdateNow: func(ctx context.Context) (string, error) { return selfupdate.CheckOnce(ctx, upd) },
|
||||
UpdateNow: func(ctx context.Context, progress func(string, int, string)) (string, error) {
|
||||
c := upd
|
||||
c.Progress = func(e selfupdate.Event) { progress(e.Stage, e.Pct, e.Line) }
|
||||
return selfupdate.CheckOnce(ctx, c)
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in new issue
Block a user