mirror of
https://github.com/DeBrosOfficial/orama.git
synced 2026-03-27 12:24:12 +00:00
- add monorepo Makefile delegating to sub-projects - update CI workflows, GoReleaser, gitignore for new structure - revise README, CONTRIBUTING.md for monorepo overview - bump Go to 1.24
36 lines
784 B
Go
36 lines
784 B
Go
// orama-agent is the sole root process on OramaOS.
|
|
// It handles enrollment, LUKS key management, service supervision,
|
|
// over-the-air updates, and command reception.
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
"os/signal"
|
|
"syscall"
|
|
|
|
"github.com/DeBrosOfficial/orama-os/agent/internal/boot"
|
|
)
|
|
|
|
func main() {
|
|
log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)
|
|
log.Println("orama-agent starting")
|
|
|
|
agent, err := boot.NewAgent()
|
|
if err != nil {
|
|
log.Fatalf("failed to initialize agent: %v", err)
|
|
}
|
|
|
|
if err := agent.Run(); err != nil {
|
|
log.Fatalf("agent failed: %v", err)
|
|
}
|
|
|
|
// Wait for termination signal
|
|
sigCh := make(chan os.Signal, 1)
|
|
signal.Notify(sigCh, syscall.SIGTERM, syscall.SIGINT)
|
|
sig := <-sigCh
|
|
log.Printf("received %s, shutting down", sig)
|
|
|
|
agent.Shutdown()
|
|
}
|