mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-29 13:51:51 +02:00
all: make router setup/cleanup works more generally
This commit is contained in:
1 parent
66cb7cc21d
commit
9ed8e49a08
13 files changed
+115
-34
No files matched your search
@@ -44,6 +44,9 @@ func (s *Synology) PreRun() error {
|
||||
}
|
||||
|
||||
func (s *Synology) Setup() error {
|
||||
if s.cfg.FirstListener().IsDirectDnsListener() {
|
||||
return nil
|
||||
}
|
||||
data, err := dnsmasq.ConfTmpl(dnsmasq.ConfigContentTmpl, s.cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -61,6 +64,9 @@ func (s *Synology) Setup() error {
|
||||
}
|
||||
|
||||
func (s *Synology) Cleanup() error {
|
||||
if s.cfg.FirstListener().IsDirectDnsListener() {
|
||||
return nil
|
||||
}
|
||||
// Remove the custom config files.
|
||||
for _, f := range []string{synologyDNSMasqConfigPath, synologyDhcpdInfoPath} {
|
||||
if err := os.Remove(f); err != nil {
|
||||
|
||||
Reference in new issue
Block a user