all: make router setup/cleanup works more generally

This commit is contained in:
Cuong Manh Le
2023-08-09 23:54:23 +07:00
committed by Cuong Manh Le
parent 66cb7cc21d
commit 9ed8e49a08
13 changed files with 115 additions and 34 deletions
+6
View File
@@ -62,6 +62,9 @@ func (e *EdgeOS) PreRun() error {
}
func (e *EdgeOS) Setup() error {
if e.cfg.FirstListener().IsDirectDnsListener() {
return nil
}
if e.isUSG {
return e.setupUSG()
}
@@ -69,6 +72,9 @@ func (e *EdgeOS) Setup() error {
}
func (e *EdgeOS) Cleanup() error {
if e.cfg.FirstListener().IsDirectDnsListener() {
return nil
}
if e.isUSG {
return e.cleanupUSG()
}