Makefile and agent start.

This commit is contained in:
Kalzu Rekku
2026-04-17 19:23:04 +03:00
parent 51e0355ec8
commit 99e0e0208c
14 changed files with 1060 additions and 1 deletions

30
agent/main.go Normal file
View File

@@ -0,0 +1,30 @@
package main
import (
"log"
"os"
"os/signal"
"syscall"
"kattila-agent/api"
"kattila-agent/config"
"kattila-agent/reporter"
"kattila-agent/security"
)
func main() {
log.Println("Kattila Agent starting...")
config.LoadConfig()
security.StartKeyPoller()
api.StartServer(reporter.HandleRelay)
reporter.StartLoop()
// Wait for termination signal
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
<-sigChan
log.Println("Kattila Agent shutting down...")
}