Enterprise release: add self-updates, command signing, and telemetry enhancements
This commit is contained in:
@@ -12,26 +12,30 @@ func main() {
|
||||
log.Println("Starting Theta Agent...")
|
||||
|
||||
// Attempt to load configuration
|
||||
configPath := "/etc/theta/agent.yml"
|
||||
configPath := "/etc/theta42/agent.yml"
|
||||
if len(os.Args) > 1 {
|
||||
configPath = os.Args[1]
|
||||
}
|
||||
|
||||
cfg, err := LoadConfig(configPath)
|
||||
cm, err := NewConfigManager(configPath)
|
||||
if err != nil {
|
||||
log.Fatalf("Error loading configuration from %s: %v", configPath, err)
|
||||
}
|
||||
cfg := cm.Get()
|
||||
|
||||
log.Printf("Connecting to SSO Manager at %s", cfg.ServerURL)
|
||||
log.Printf("Loaded capabilities: Telemetry=%v, LDAP=%v, Reboot=%v, Bash=%v",
|
||||
cfg.Capabilities.Telemetry,
|
||||
cfg.Capabilities.ConfigureLDAP,
|
||||
cfg.Capabilities.Reboot,
|
||||
log.Printf("Loaded capabilities: Telemetry=%v, LDAP=%v, Reboot=%v, Bash=%v",
|
||||
cfg.Capabilities.Telemetry,
|
||||
cfg.Capabilities.ConfigureLDAP,
|
||||
cfg.Capabilities.Reboot,
|
||||
cfg.Capabilities.ArbitraryBash,
|
||||
)
|
||||
|
||||
// Initialize system executor
|
||||
exec := &SystemExecutor{}
|
||||
|
||||
// WebSocket connection to SSO Manager
|
||||
go connectWebSocket(cfg)
|
||||
go connectWebSocket(cm, exec)
|
||||
|
||||
// Block until signal is received
|
||||
sigs := make(chan os.Signal, 1)
|
||||
|
||||
Reference in New Issue
Block a user