all: add support for pfsense

This commit is contained in:
Cuong Manh Le
2023-05-29 23:16:23 +07:00
committed by Cuong Manh Le
parent 8fda856e24
commit b143e46eb0
6 changed files with 83 additions and 9 deletions

View File

@@ -312,7 +312,7 @@ func initCLI() {
{s.Start, true},
}
if doTasks(tasks) {
if err := router.PostInstall(); err != nil {
if err := router.PostInstall(svcConfig); err != nil {
mainLog.Warn().Err(err).Msg("post installation failed, please check system/service log for details error")
return
}
@@ -468,7 +468,7 @@ NOTE: Uninstalling will set DNS to values provided by DHCP.`,
}
prog.resetDNS()
mainLog.Debug().Msg("Router cleanup")
if err := router.Cleanup(); err != nil {
if err := router.Cleanup(svcConfig); err != nil {
mainLog.Warn().Err(err).Msg("could not cleanup router")
}
mainLog.Notice().Msg("Service uninstalled")

View File

@@ -1,3 +1,5 @@
//go:build linux || freebsd
package main
import (

View File

@@ -1,4 +1,4 @@
//go:build !linux
//go:build !linux && !freebsd
package main