fea: access for ceci.

This commit is contained in:
Daniel Ding
2025-04-13 15:33:35 +08:00
parent d7622bbc05
commit 754d933e68
859 changed files with 120670 additions and 145098 deletions

33
cmd/access/main_linux.go Executable file
View File

@@ -0,0 +1,33 @@
//go:build linux
package main
import (
"github.com/luscis/openlan/pkg/access"
"github.com/luscis/openlan/pkg/config"
"github.com/luscis/openlan/pkg/libol"
)
func main() {
c := config.NewPoint()
p := access.NewPoint(c)
// terminal off for linux service, on for open a terminal
// and others just wait.
if c.Terminal == "off" {
libol.PreNotify()
}
p.Initialize()
libol.Go(p.Start)
if c.Terminal == "on" {
t := access.NewTerminal(p)
t.Start()
} else if c.Terminal == "off" {
libol.SdNotify()
libol.Wait()
} else {
libol.Wait()
}
p.Stop()
}