mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02:00
all: make router setup/cleanup works more generally
This commit is contained in:
@@ -47,6 +47,9 @@ func (u *Ubios) PreRun() error {
|
||||
}
|
||||
|
||||
func (u *Ubios) Setup() error {
|
||||
if u.cfg.FirstListener().IsDirectDnsListener() {
|
||||
return nil
|
||||
}
|
||||
data, err := dnsmasq.ConfTmpl(dnsmasq.ConfigContentTmpl, u.cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -62,6 +65,9 @@ func (u *Ubios) Setup() error {
|
||||
}
|
||||
|
||||
func (u *Ubios) Cleanup() error {
|
||||
if u.cfg.FirstListener().IsDirectDnsListener() {
|
||||
return nil
|
||||
}
|
||||
// Remove the custom dnsmasq config
|
||||
if err := os.Remove(ubiosDNSMasqConfigPath); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user