Report version and auto-update state to Hammerhead and update on request
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7597f12db9
commit
049b6bad97
4 files changed
+59
-2
No files matched your search
@@ -50,9 +50,12 @@ func main() {
|
||||
flag.Usage()
|
||||
os.Exit(2)
|
||||
}
|
||||
upd := selfupdate.Config{Server: "https://git.veillax.com", Repo: "Veillax/blacktip", App: "blacktip", Current: version, Logf: log.Printf}
|
||||
b, err := blacktip.New(blacktip.Config{
|
||||
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) },
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@@ -61,7 +64,7 @@ func main() {
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer stop()
|
||||
if *autoUpdate {
|
||||
go selfupdate.Run(ctx, selfupdate.Config{Server: "https://git.veillax.com", Repo: "Veillax/blacktip", App: "blacktip", Current: version, Logf: log.Printf})
|
||||
go selfupdate.Run(ctx, upd)
|
||||
}
|
||||
if err := b.Run(ctx); err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in new issue
Block a user