Moved fw-daemon to command/lib

pull/41/head
xSmurf 8 years ago
parent 1c54b571ba
commit 4b632fb6f2

@ -0,0 +1,9 @@
package main
import (
"github.com/subgraph/fw-daemon/sgfw"
)
func main() {
sgfw.Main()
}

@ -1,4 +1,4 @@
package main package sgfw
import ( import (
"bufio" "bufio"

@ -1,4 +1,4 @@
package main package sgfw
import ( import (
"errors" "errors"

@ -1,4 +1,4 @@
package main package sgfw
import ( import (
"net" "net"

@ -20,7 +20,7 @@
// TODO(rsc): There are enough names defined in this file that they're all // TODO(rsc): There are enough names defined in this file that they're all
// prefixed with dns. Perhaps put this in its own package later. // prefixed with dns. Perhaps put this in its own package later.
package main package sgfw
import "net" import "net"

@ -1,4 +1,4 @@
package main package sgfw
import ( import (
"fmt" "fmt"

@ -1,4 +1,4 @@
package main package sgfw
import ( import (
"fmt" "fmt"

@ -1,4 +1,4 @@
package main package sgfw
import ( import (
"fmt" "fmt"

@ -1,4 +1,4 @@
package main package sgfw
import ( import (
"fmt" "fmt"

@ -1,4 +1,4 @@
package main package sgfw
import ( import (
"encoding/binary" "encoding/binary"

@ -1,4 +1,4 @@
package main package sgfw
import ( import (
"os" "os"
@ -139,7 +139,7 @@ func (fw *Firewall) runFilter() {
var commentRegexp = regexp.MustCompile("^[ \t]*#") var commentRegexp = regexp.MustCompile("^[ \t]*#")
func main() { func Main() {
readConfig() readConfig()
logBackend := setupLoggerBackend(FirewallConfig.LoggingLevel) logBackend := setupLoggerBackend(FirewallConfig.LoggingLevel)
log.SetBackend(logBackend) log.SetBackend(logBackend)

Loading…
Cancel
Save