fix updates
This commit is contained in:
parent
a34b4849dd
commit
5d94c40399
9
main.go
9
main.go
@ -61,19 +61,22 @@ func main() {
|
||||
domain: domain,
|
||||
conf: conf,
|
||||
}
|
||||
count := 0
|
||||
for _, v := range watchconf.Users {
|
||||
err := a.Add(&v)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatal(err, "reg", count)
|
||||
}
|
||||
count++
|
||||
}
|
||||
count = 0
|
||||
for _, v := range watchconf.Hosts {
|
||||
err := a.Add(&v)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatal(err, "reg", count)
|
||||
}
|
||||
count++
|
||||
}
|
||||
log.Info(a)
|
||||
server := &http.Server{Addr: fmt.Sprintf("0.0.0.0:%v", port), Handler: a.server()}
|
||||
var wg sync.WaitGroup
|
||||
c := make(chan os.Signal, 1)
|
||||
|
@ -57,7 +57,7 @@ func (h HostRegistration) Valid() bool {
|
||||
}
|
||||
|
||||
func (h *HostRegistration) Update(_ config.Config) (string, error) {
|
||||
resp, err := http.Get("icanhazip.com")
|
||||
resp, err := http.Get("https://icanhazip.com")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user