cmd/dnsupdater/main.go: log and continue if service is not found
This commit is contained in:
parent
9d0288174e
commit
49563af412
1 changed files with 7 additions and 2 deletions
|
|
@ -33,11 +33,16 @@ func main() {
|
||||||
|
|
||||||
for service_name, domains := range config.Updates {
|
for service_name, domains := range config.Updates {
|
||||||
|
|
||||||
log.Info().Str("service", service_name).Msg("Begin update for service")
|
|
||||||
|
|
||||||
// Get service
|
// Get service
|
||||||
service := app.ProviderManager.Get(service_name)
|
service := app.ProviderManager.Get(service_name)
|
||||||
|
|
||||||
|
if service == nil {
|
||||||
|
log.Warn().Str("service", service_name).Msg("Invalid service")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Info().Str("service", service_name).Msg("Begin update for service")
|
||||||
|
|
||||||
for domain, records := range domains {
|
for domain, records := range domains {
|
||||||
for name, data := range records {
|
for name, data := range records {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue