mirror of
https://github.com/bakito/adguardhome-sync.git
synced 2024-09-20 06:46:12 +08:00
remove beta #12
This commit is contained in:
parent
f2de32a2c1
commit
aca26f449e
|
@ -13,13 +13,13 @@ Synchronize [AdGuardHome](https://github.com/AdguardTeam/AdGuardHome) config to
|
|||
- Rewrites
|
||||
- Services
|
||||
- Clients
|
||||
- DNS Config (BETA)
|
||||
- DHCP Config (BETA)
|
||||
- DNS Config
|
||||
- DHCP Config
|
||||
|
||||
### Setup of initial instances
|
||||
|
||||
New AdGuardHome replica instances can be automatically installed if enabled via the config autoSetup.
|
||||
During automatic installation, the admin interface will be listening on port 3000 in runtime.
|
||||
New AdGuardHome replica instances can be automatically installed if enabled via the config autoSetup. During automatic
|
||||
installation, the admin interface will be listening on port 3000 in runtime.
|
||||
|
||||
To skip automatic setup
|
||||
|
||||
|
|
|
@ -147,20 +147,16 @@ func (w *worker) sync() {
|
|||
return
|
||||
}
|
||||
|
||||
if w.cfg.WithBeta("dns") {
|
||||
o.dnsConfig, err = oc.DNSConfig()
|
||||
if err != nil {
|
||||
sl.With("error", err).Error("Error getting dns config")
|
||||
return
|
||||
}
|
||||
o.dnsConfig, err = oc.DNSConfig()
|
||||
if err != nil {
|
||||
sl.With("error", err).Error("Error getting dns config")
|
||||
return
|
||||
}
|
||||
|
||||
if w.cfg.WithBeta("dhcp") {
|
||||
o.dhcpServerConfig, err = oc.DHCPServerConfig()
|
||||
if err != nil {
|
||||
sl.With("error", err).Error("Error getting dhcp server config")
|
||||
return
|
||||
}
|
||||
o.dhcpServerConfig, err = oc.DHCPServerConfig()
|
||||
if err != nil {
|
||||
sl.With("error", err).Error("Error getting dhcp server config")
|
||||
return
|
||||
}
|
||||
|
||||
replicas := w.cfg.UniqueReplicas()
|
||||
|
@ -224,18 +220,14 @@ func (w *worker) syncTo(l *zap.SugaredLogger, o *origin, replica types.AdGuardIn
|
|||
return
|
||||
}
|
||||
|
||||
if w.cfg.WithBeta("dns") {
|
||||
if err = w.syncDNS(o.accessList, o.dnsConfig, rc); err != nil {
|
||||
rl.With("error", err).Error("Error syncing dns")
|
||||
return
|
||||
}
|
||||
if err = w.syncDNS(o.accessList, o.dnsConfig, rc); err != nil {
|
||||
rl.With("error", err).Error("Error syncing dns")
|
||||
return
|
||||
}
|
||||
|
||||
if w.cfg.WithBeta("dhcp") {
|
||||
if err = w.syncDHCPServer(o.dhcpServerConfig, rc); err != nil {
|
||||
rl.With("error", err).Error("Error syncing dns")
|
||||
return
|
||||
}
|
||||
if err = w.syncDHCPServer(o.dhcpServerConfig, rc); err != nil {
|
||||
rl.With("error", err).Error("Error syncing dns")
|
||||
return
|
||||
}
|
||||
|
||||
rl.Info("Sync done")
|
||||
|
|
|
@ -413,7 +413,7 @@ var _ = Describe("Sync", func() {
|
|||
w.cfg = &types.Config{
|
||||
Origin: types.AdGuardInstance{},
|
||||
Replica: types.AdGuardInstance{URL: "foo"},
|
||||
Beta: "dhcp,dns",
|
||||
Beta: "",
|
||||
}
|
||||
// origin
|
||||
cl.EXPECT().Host()
|
||||
|
|
Loading…
Reference in a new issue